summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-04-01 22:51:47 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-04-01 22:51:47 (GMT)
commitfbbd2b9cd26f7c291d1707e2b960b13fc7ca02d1 (patch)
treefbf7fcc1b6e5273d09fca415ff36d1f3d77cffc3
parentd7a5f94d66390f2a777e51dba2e781d7f84e0656 (diff)
downloadhdf5-fbbd2b9cd26f7c291d1707e2b960b13fc7ca02d1.zip
hdf5-fbbd2b9cd26f7c291d1707e2b960b13fc7ca02d1.tar.gz
hdf5-fbbd2b9cd26f7c291d1707e2b960b13fc7ca02d1.tar.bz2
[svn-r8292] Purpose:
Feature. Description: Added GetTestParameters() to provide Test Parameters to individual test programs. Platforms tested: "h5committested"
-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 f99a15f..d3391ac 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;
/*
@@ -247,12 +248,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)
@@ -347,6 +350,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.
*/