summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/h5test.h2
-rw-r--r--test/testframe.c47
2 files changed, 49 insertions, 0 deletions
diff --git a/test/h5test.h b/test/h5test.h
index fc5c772..a21ccdc 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -147,6 +147,8 @@ H5TEST_DLL int SetTestVerbosity(int newval);
H5TEST_DLL int GetTestSummary(void);
H5TEST_DLL int GetTestCleanup(void);
H5TEST_DLL int SetTestNoCleanup(void);
+H5TEST_DLL int GetTestExpress(void);
+H5TEST_DLL int SetTestExpress(int newval);
H5TEST_DLL void ParseTestVerbosity(char *argv);
H5TEST_DLL int GetTestNumErrs(void);
H5TEST_DLL void IncTestNumErrs(void);
diff --git a/test/testframe.c b/test/testframe.c
index f4c19c2..4c645c2 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 int Summary = 0; /* Show test summary. Default is no. */
static int CleanUp = 1; /* Do cleanup or not. Default is yes. */
+static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */
static TestStruct Test[MAXNUMOFTESTS];
static int Index = 0;
static const void *Test_parameters = NULL;
@@ -376,6 +377,52 @@ int SetTestVerbosity(int newval)
}
/*
+ * Retrieve the TestExpress mode for the testing framework
+ * Values: non-zero means TestExpress mode is on, 0 means off.
+ *
+ * Design:
+ If the environment variable $HDF5TestExpress is defined,
+ then an intensive test should run the test in an express
+ mode such that it completes sooner.
+
+ Terms:
+ Intensive means tests that take more than minutes, say 5 minutes,
+ to complete.
+ "sooner" means tests will finish under 5 minutes.
+ Express mode--probably use smaller test sizes, or skip some tests.
+ Test program should print a caution that it is running the express
+ mode.
+
+ Implementation:
+ I think this can be easily implemented in the test library (libh5test.a)
+ so that all tests can just call it to check the status of $HDF5TestExpress.
+ For now, it is just defined or not, the actual value does not matter.
+ It is possible to define levels of express but I could not think of a
+ good use case for it.
+ */
+int GetTestExpress(void)
+{
+ /* set it here for now. Should be done in something like h5test_init(). */
+ if (TestExpress==-1)
+ SetTestExpress(getenv("HDF5TestExpress")? 1 : 0);
+ return(TestExpress);
+}
+
+/*
+ * Set the TestExpress mode for the testing framework.
+ * Return previous TestExpress mode.
+ * Values: non-zero means TestExpress mode is on, 0 means off.
+ */
+int SetTestExpress(int newval)
+{
+ int oldval;
+
+ oldval = TestExpress;
+ TestExpress = newval;
+ return(oldval);
+}
+
+/*
* Retrieve Summary request value.
* 0 means no summary, 1 means yes.
*/