mirror of
https://github.com/fadden/nulib2.git
synced 2024-05-28 23:41:29 +00:00
Added "tr" command (NuTestRecord).
This commit is contained in:
parent
b5a25968d6
commit
693ddd6d61
|
@ -981,6 +981,20 @@ TestFunc(ExerciserState* pState, int argc, char** argv)
|
||||||
return NuTest(ExerciserState_GetNuArchive(pState));
|
return NuTest(ExerciserState_GetNuArchive(pState));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* tr - test record
|
||||||
|
*/
|
||||||
|
static NuError
|
||||||
|
TestRecordFunc(ExerciserState* pState, int argc, char** argv)
|
||||||
|
{
|
||||||
|
(void) pState, (void) argc, (void) argv; /* shut up, gcc */
|
||||||
|
assert(ExerciserState_GetNuArchive(pState) != nil);
|
||||||
|
assert(argc == 2);
|
||||||
|
|
||||||
|
return NuTestRecord(ExerciserState_GetNuArchive(pState),
|
||||||
|
strtol(argv[1], nil, 0));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* upt - update pre-sized thread
|
* upt - update pre-sized thread
|
||||||
*/
|
*/
|
||||||
|
@ -1113,6 +1127,8 @@ static const struct {
|
||||||
"Set record attributes" },
|
"Set record attributes" },
|
||||||
{ "t", TestFunc, 0, "", kFlagArchiveReq,
|
{ "t", TestFunc, 0, "", kFlagArchiveReq,
|
||||||
"Test archive" },
|
"Test archive" },
|
||||||
|
{ "tr", TestRecordFunc, 1, "recordIdx", kFlagArchiveReq,
|
||||||
|
"Test record" },
|
||||||
{ "upt", UpdatePresizedThreadFunc, 1, "threadIdx", kFlagArchiveReq,
|
{ "upt", UpdatePresizedThreadFunc, 1, "threadIdx", kFlagArchiveReq,
|
||||||
"Update pre-sized thread" },
|
"Update pre-sized thread" },
|
||||||
};
|
};
|
||||||
|
@ -1330,6 +1346,7 @@ main(void)
|
||||||
&nufxLibDate, &nufxLibFlags);
|
&nufxLibDate, &nufxLibFlags);
|
||||||
printf("NufxLib exerciser, linked with NufxLib v%ld.%ld.%ld [%s]\n\n",
|
printf("NufxLib exerciser, linked with NufxLib v%ld.%ld.%ld [%s]\n\n",
|
||||||
majorVersion, minorVersion, bugVersion, nufxLibFlags);
|
majorVersion, minorVersion, bugVersion, nufxLibFlags);
|
||||||
|
printf("Use 'h' or '?' for help, 'q' to quit.\n");
|
||||||
|
|
||||||
/* stuff useful when debugging lots */
|
/* stuff useful when debugging lots */
|
||||||
if (unlink(kTempFile) == 0)
|
if (unlink(kTempFile) == 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user