mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Minor refactoring of testframe.c testing framework (#4930)
Added setup and cleanup callback parameters to TestInit() to perform setup and cleanup tasks once for whole test program Removed TestCleanup() function since its functionality is covered by PerformTests() Added check of the HDF5_NOCLEANUP environment variable in GetTestCleanup()
This commit is contained in:
@@ -32,8 +32,6 @@
|
||||
PerformTests() -- Perform requested testing
|
||||
GetTestSummary() -- Retrieve Summary request value
|
||||
TestSummary() -- Display test summary
|
||||
GetTestCleanup() -- Retrieve Cleanup request value
|
||||
TestCleanup() -- Clean up files from testing
|
||||
GetTestNumErrs() -- Retrieve the number of testing errors
|
||||
|
||||
***************************************************************************/
|
||||
@@ -57,7 +55,7 @@ main(int argc, char *argv[])
|
||||
// caused deliberately and expected.
|
||||
Exception::dontPrint();
|
||||
/* Initialize testing framework */
|
||||
TestInit(argv[0], NULL, NULL, 0);
|
||||
TestInit(argv[0], NULL, NULL, NULL, NULL, 0);
|
||||
|
||||
// testing file creation and opening in tfile.cpp
|
||||
AddTest("tfile", test_file, NULL, cleanup_file, NULL, 0, "File I/O Operations");
|
||||
@@ -112,10 +110,6 @@ main(int argc, char *argv[])
|
||||
if (GetTestSummary())
|
||||
TestSummary(stdout);
|
||||
|
||||
/* Clean up test files, if allowed */
|
||||
if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP))
|
||||
TestCleanup();
|
||||
|
||||
/* Release test infrastructure */
|
||||
TestShutdown();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user