summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-04-01 22:51:42 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-04-01 22:51:42 (GMT)
commit44b990001fdab39ed714a7162eb0042664d43853 (patch)
treecfb95b3ba188556373c862802f9c0a641f0e58bd /test
parent310a684fc28d719c1ed4e67818a5810ad632e547 (diff)
downloadhdf5-44b990001fdab39ed714a7162eb0042664d43853.zip
hdf5-44b990001fdab39ed714a7162eb0042664d43853.tar.gz
hdf5-44b990001fdab39ed714a7162eb0042664d43853.tar.bz2
[svn-r8291] Purpose:
Feature. Description: Added GetTestParameters() to provide Test Parameters to individual test programs. Platforms tested: "h5committested"
Diffstat (limited to 'test')
-rw-r--r--test/h5test.h1
-rw-r--r--test/testframe.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/test/h5test.h b/test/h5test.h
index a903349..fa4ed43 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -127,6 +127,7 @@ H5TEST_DLL int GetTestVerbosity(void);
H5TEST_DLL int SetTestVerbosity(int newval);
H5TEST_DLL void ParseTestVerbosity(char *argv);
H5TEST_DLL int GetTestNumErrs(void);
+H5TEST_DLL void *GetTestParameters(void);
H5TEST_DLL int TestErrPrintf(const char *format, ...);
#ifdef H5_HAVE_PARALLEL
diff --git a/test/testframe.c b/test/testframe.c
index 30f3df5..7373d54 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -47,6 +47,7 @@ static int num_errs = 0; /* Total number of errors during testing */
static int Verbosity = VERBO_DEF; /* Default Verbosity is Low */
static TestStruct Test[MAXNUMOFTESTS];
static int Index = 0;
+static void *Test_parameters = NULL;
/*
@@ -242,12 +243,14 @@ void PerformTests(void)
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
+ Test_parameters = Test[Loop].Parameters;
Test[Loop].Call();
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
MESSAGE(5, ("===============================================\n"));
MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors));
}
+ Test_parameters = NULL; /* clear it. */
MESSAGE(2, ("\n\n"))
if (num_errs)
@@ -342,6 +345,15 @@ int GetTestNumErrs(void)
/*
+ * Retrieve the current Test Parameters pointer.
+ */
+void *GetTestParameters(void)
+{
+ return(Test_parameters);
+}
+
+
+/*
* This routine is designed to provide equivalent functionality to 'printf'
* and also increment the error count for the testing framework.
*/