diff options
-rw-r--r-- | test/testframe.c | 26 | ||||
-rw-r--r-- | test/testhdf5.h | 1 |
2 files changed, 19 insertions, 8 deletions
diff --git a/test/testframe.c b/test/testframe.c index e25d3ec..3b24b30 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -169,14 +169,7 @@ void TestParseCmdLine(int argc, char *argv[], int *Summary, int *CleanUp) for (CLLoop = 1; CLLoop < argc; CLLoop++) { if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-verbose") == 0) || (HDstrcmp(argv[CLLoop], "-v") == 0))) { - if (argv[CLLoop + 1][0] == 'l') - SetTestVerbosity(VERBO_LO); - else if (argv[CLLoop + 1][0] == 'm') - SetTestVerbosity(VERBO_MED); - else if (argv[CLLoop + 1][0] == 'h') - SetTestVerbosity(VERBO_HI); - else - SetTestVerbosity(atoi(argv[CLLoop + 1])); + ParseTestVerbosity(argv[CLLoop + 1]); } /* end if */ if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-summary") == 0) || (HDstrcmp(argv[CLLoop], "-s") == 0))) @@ -320,6 +313,23 @@ int SetTestVerbosity(int newval) return(oldval); } +/* + * Parse an argument string for verbosity level and set it. + */ +void ParseTestVerbosity(char *argv) +{ + printf("argv = %s\n", argv); + if (*argv == 'l') + SetTestVerbosity(VERBO_LO); + else if (*argv == 'm') + SetTestVerbosity(VERBO_MED); + else if (*argv == 'h') + SetTestVerbosity(VERBO_HI); + else + SetTestVerbosity(atoi(argv)); + printf("Verbosity = %d\n", GetTestVerbosity()); +} + /* * Retrieve the number of testing errors for the testing framework diff --git a/test/testhdf5.h b/test/testhdf5.h index ad532a9..5a560d9 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -188,6 +188,7 @@ H5TEST_DLL void TestCleanup(void); H5TEST_DLL void TestInit(void); H5TEST_DLL int GetTestVerbosity(void); H5TEST_DLL int SetTestVerbosity(int newval); +H5TEST_DLL void ParseTestVerbosity(char *argv); H5TEST_DLL int GetTestNumErrs(void); H5TEST_DLL int TestErrPrintf(const char *format, ...); |