summaryrefslogtreecommitdiffstats
path: root/test/testframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testframe.c')
-rw-r--r--test/testframe.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/test/testframe.c b/test/testframe.c
index 416ae33..8070cf4 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -170,13 +170,13 @@ void TestParseCmdLine(int argc, char *argv[], int *Summary, int *CleanUp)
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-verbose") == 0) ||
(HDstrcmp(argv[CLLoop], "-v") == 0))) {
if (argv[CLLoop + 1][0] == 'l')
- Verbosity = VERBO_LO;
+ SetTestVerbosity(VERBO_LO);
else if (argv[CLLoop + 1][0] == 'm')
- Verbosity = VERBO_MED;
+ SetTestVerbosity(VERBO_MED);
else if (argv[CLLoop + 1][0] == 'h')
- Verbosity = VERBO_HI;
+ SetTestVerbosity(VERBO_HI);
else
- Verbosity = atoi(argv[CLLoop + 1]);
+ SetTestVerbosity(atoi(argv[CLLoop + 1]));
} /* end if */
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-summary") == 0) ||
(HDstrcmp(argv[CLLoop], "-s") == 0)))
@@ -307,6 +307,19 @@ int GetTestVerbosity(void)
return(Verbosity);
}
+/*
+ * Set the verbosity level for the testing framework.
+ * Return previous verbosity level.
+ */
+int SetTestVerbosity(int new)
+{
+ int old;
+
+ old = Verbosity;
+ Verbosity = new;
+ return(old);
+}
+
/*
* Retrieve the number of testing errors for the testing framework