diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2004-08-19 06:34:59 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2004-08-19 06:34:59 (GMT) |
commit | 19cb3b5ae784c804efbc9a730bebb710845e4602 (patch) | |
tree | 02951364f326db62aa92e07ffd7285febd6ecbad /test/ttsafe.c | |
parent | d3e91f26898ea8de856bb82e8d9643dccae0d138 (diff) | |
download | hdf5-19cb3b5ae784c804efbc9a730bebb710845e4602.zip hdf5-19cb3b5ae784c804efbc9a730bebb710845e4602.tar.gz hdf5-19cb3b5ae784c804efbc9a730bebb710845e4602.tar.bz2 |
[svn-r9116] Purpose:
feature
Description:
Another revamp of the test interface.
TestInit: is used to register Test Program name, test program specific
Usage and option parsing routines.
TestUsage: will invoke extra usage routine if provided.
TestParseCmdLine: will invoke extra option parsing routine if provided.
GetTestSummary() and GetTestCleanup() replaces the previous Summary and
CleanUp arguments of TestParseCmdLine.
test/testhdf5, test/ttsafe.c, testpar/t_mpi.c, testpar/testphdf5.c:
All have been updated to use the new Test Routines.
testpar/t_mpi.c:
Also a fix of a compiler optimization bug when pgcc in Linux is
used to compile it. Changed buf[] and expected to unsigned char
type to avoid a bug that failed to do sign-extension.
Platforms tested:
"h5committested"
Also tested thread-safe option in eirene.
Diffstat (limited to 'test/ttsafe.c')
-rw-r--r-- | test/ttsafe.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/ttsafe.c b/test/ttsafe.c index 0a4bb34..0e24bf3 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -85,10 +85,8 @@ char *gen_name(int value) int main(int argc, char *argv[]) { - int Summary = 0, CleanUp = 1; - /* Initialize testing framework */ - TestInit(); + TestInit(argv[0], NULL, NULL); /* Tests are generally arranged from least to most complexity... */ AddTest("dcreate", tts_dcreate, cleanup_dcreate, "multi-dataset creation", NULL); @@ -100,17 +98,17 @@ int main(int argc, char *argv[]) TestInfo(argv[0]); /* Parse command line arguments */ - TestParseCmdLine(argc,argv,&Summary,&CleanUp,NULL); + TestParseCmdLine(argc,argv); /* Perform requested testing */ PerformTests(); /* Display test summary, if requested */ - if (Summary) + if (GetTestSummary()) TestSummary(); /* Clean up test files, if allowed */ - if (CleanUp && !getenv("HDF5_NOCLEANUP")) + if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) TestCleanup(); return GetTestNumErrs(); |