summaryrefslogtreecommitdiffstats
path: root/test/testframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testframe.c')
-rw-r--r--test/testframe.c26
1 files changed, 18 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