summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-08-19 06:32:47 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-08-19 06:32:47 (GMT)
commit3c596787759d86e8f672f51e8675e93dc3f6d6dc (patch)
tree82869255fc6b1a25161147e0194cde2c71746b06 /testpar/testphdf5.c
parent3fe6ec11413f24d5dfcab5ac050c9e7312c3fd9d (diff)
downloadhdf5-3c596787759d86e8f672f51e8675e93dc3f6d6dc.zip
hdf5-3c596787759d86e8f672f51e8675e93dc3f6d6dc.tar.gz
hdf5-3c596787759d86e8f672f51e8675e93dc3f6d6dc.tar.bz2
[svn-r9115] 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 'testpar/testphdf5.c')
-rw-r--r--testpar/testphdf5.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 106e4ba..3578843 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -121,7 +121,7 @@ int MPI_Init(int *argc, char ***argv)
static void
usage(void)
{
- printf("Usage: testphdf5 [-r] [-w] [-v<verbosity>] [-m<n_datasets>] [-n<n_groups>] "
+ printf(" [-r] [-w] [-v<verbosity>] [-m<n_datasets>] [-n<n_groups>] "
"[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
printf("\t-r\t\tno read test\n");
printf("\t-w\t\tno write test\n");
@@ -368,8 +368,6 @@ int main(int argc, char **argv)
int mpi_size, mpi_rank; /* mpi variables */
H5Ptest_param_t ndsets_params, ngroups_params;
H5Ptest_param_t collngroups_params;
- int Summary = 0;
- int CleanUp = 1;
/* Un-buffer the stdout and stderr */
setbuf(stderr, NULL);
@@ -388,7 +386,7 @@ int main(int argc, char **argv)
h5_show_hostname();
/* Initialize testing framework */
- TestInit();
+ TestInit(argv[0], usage, parse_options);
/* Tests are generally arranged from least to most complexity... */
AddTest("mpio_dup", test_fapl_mpio_dup, NULL,
@@ -476,7 +474,7 @@ int main(int argc, char **argv)
H5Pset_fapl_mpio(fapl, MPI_COMM_WORLD, MPI_INFO_NULL);
/* Parse command line arguments */
- TestParseCmdLine(argc, argv, &Summary, &CleanUp, parse_options);
+ TestParseCmdLine(argc, argv);
/*
if (parse_options(argc, argv) != 0){
@@ -501,11 +499,11 @@ int main(int argc, char **argv)
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();
nerrors += GetTestNumErrs();