From 5a7fcfa213dbd65e8745d842b229ad777deace94 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sat, 7 Aug 2004 22:01:03 -0500 Subject: [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: --- test/h5test.h | 3 +-- test/testframe.c | 25 ++++++++++++++++--------- testpar/testphdf5.c | 6 ++++-- 3 files changed, 21 insertions(+), 13 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); } diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 2eee9e8..bc90eaf 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -459,9 +459,11 @@ int main(int argc, char **argv) AddTest("indngroupsread", independent_group_read, NULL, "independent group and dataset read", &collngroups_params); + /* By default, do not run big dataset. */ + AddTest("-bigdataset", big_dataset, NULL, + "big dataset test", filenames[7]); if (dobig && sizeof(MPI_Offset)>4){ - AddTest("bigdataset", big_dataset, NULL, - "big dataset test", filenames[7]); + SetTest("bigdataset", ONLYTEST); } AddTest("fillvalue", dataset_fillvalue, NULL, "dataset fill value", filenames[8]); -- cgit v0.12