summaryrefslogtreecommitdiffstats
path: root/test/testframe.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-01-23 06:29:57 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-01-23 06:29:57 (GMT)
commit72ca2d086f1e80ee4c8ca5f4fb1acf508e89f4f0 (patch)
treec657befe94450c062fe0ecc981c0cbc119ab4c0b /test/testframe.c
parent06d17aff4d4c801653d2af6983fe2ca60c9e1fe9 (diff)
downloadhdf5-72ca2d086f1e80ee4c8ca5f4fb1acf508e89f4f0.zip
hdf5-72ca2d086f1e80ee4c8ca5f4fb1acf508e89f4f0.tar.gz
hdf5-72ca2d086f1e80ee4c8ca5f4fb1acf508e89f4f0.tar.bz2
[svn-r8100] Purpose:
Added the function ParseTestVerbosity() to be shared by all programs. Platforms tested: Eirene.
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