diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2004-08-08 03:01:03 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2004-08-08 03:01:03 (GMT) |
commit | 5a7fcfa213dbd65e8745d842b229ad777deace94 (patch) | |
tree | 0e47c47ccfaab1bdc9ca734239216f4a1d967034 /test | |
parent | 6936f40fb8eb01ab1c50b5c675f9830b4b5ad10b (diff) | |
download | hdf5-5a7fcfa213dbd65e8745d842b229ad777deace94.zip hdf5-5a7fcfa213dbd65e8745d842b229ad777deace94.tar.gz hdf5-5a7fcfa213dbd65e8745d842b229ad777deace94.tar.bz2 |
[svn-r9051] Purpose:
Feature
Description:
Added a feature such that if the test name starts with '-', do not run it
by default.
Platforms tested:
Eirene both serial and parallel.
Misc. update:
Diffstat (limited to 'test')
-rw-r--r-- | test/h5test.h | 3 | ||||
-rw-r--r-- | test/testframe.c | 25 |
2 files changed, 17 insertions, 11 deletions
diff --git a/test/h5test.h b/test/h5test.h index 7c6500e..396be2b 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -108,7 +108,6 @@ extern "C" { #endif /* Generally useful testing routines */ -H5TEST_DLL herr_t h5_errors(void *client_data); H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl); H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size); @@ -134,7 +133,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 const void *GetTestParameters(void); H5TEST_DLL int TestErrPrintf(const char *format, ...); H5TEST_DLL void SetTest(const char *testname, int action); diff --git a/test/testframe.c b/test/testframe.c index 27a81fc..ab0b667 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -36,7 +36,7 @@ typedef struct TestStruct { char Name[MAXTESTNAME]; void (*Call)(void); void (*Cleanup)(void); - void *Parameters; + const void *Parameters; } TestStruct; @@ -47,16 +47,17 @@ 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; +static const void *Test_parameters = NULL; /* * Setup a test function and add it to the list of tests. * It must have no parameters and returns void. - * TheName--short test name - * TheCall--the test routine - * Cleanup--the cleanup routine for the test - * TheDescr--Long description of the test + * TheName--short test name. + * If the name starts with '-', do not run it by default. + * TheCall--the test routine. + * Cleanup--the cleanup routine for the test. + * TheDescr--Long description of the test. * Parameters--pointer to extra parameters. Use NULL if none used. * Since only the pointer is copied, the contents should not change. */ @@ -82,11 +83,17 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con /* Set up test function */ HDstrcpy(Test[Index].Description, TheDescr); - HDstrcpy(Test[Index].Name, TheName); + if (*TheName != '-'){ + HDstrcpy(Test[Index].Name, TheName); + Test[Index].SkipFlag = 0; + } + else { /* skip test by default */ + HDstrcpy(Test[Index].Name, TheName+1); + Test[Index].SkipFlag = 1; + } Test[Index].Call = TheCall; Test[Index].Cleanup = Cleanup; Test[Index].NumErrors = -1; - Test[Index].SkipFlag = 0; Test[Index].Parameters = Parameters; /* Increment test count */ @@ -338,7 +345,7 @@ int GetTestNumErrs(void) /* * Retrieve the current Test Parameters pointer. */ -void *GetTestParameters(void) +const void *GetTestParameters(void) { return(Test_parameters); } |