summaryrefslogtreecommitdiffstats
path: root/test/testframe.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-01-22 23:05:55 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-01-22 23:05:55 (GMT)
commitcc171677031c2bff1ae60a45f510492733fe76d7 (patch)
tree2902e69f01953272ef62b79084019f9aa99e9ea6 /test/testframe.c
parent3300140c70bb445b05827ffd2b3e3b1098dfb00e (diff)
downloadhdf5-cc171677031c2bff1ae60a45f510492733fe76d7.zip
hdf5-cc171677031c2bff1ae60a45f510492733fe76d7.tar.gz
hdf5-cc171677031c2bff1ae60a45f510492733fe76d7.tar.bz2
[svn-r8094] Purpose:
New feature. Description: Added function SetTestVerbosity() so that other applications can set the verbosity explicitedly without the whole testframe taking over. Added Verbose queries shorthands to make code more readable and easier to change the levels of low, medium and high. Platforms tested: Eirene (both serial and parallel). Misc. update:
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