From 23eaf259ae6acb351e8b352ec7dd271ca9fd6965 Mon Sep 17 00:00:00 2001 From: James Laird Date: Mon, 19 Feb 2007 10:05:42 -0500 Subject: [svn-r13330] Added HDF5TestExpress functionality to tsohm.c. This may fix the bug that sol's been having. When Express Testing (level 2 or 3) is enabled, the test will no longer repeatedly close and re-open a file, which should work better under AFS. Tested on kagiso (extremely minor change, no new code introduced). --- test/tsohm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/tsohm.c b/test/tsohm.c index 3ebeccc..a8008bc 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -572,6 +572,12 @@ size1_helper(hid_t file, const char* filename, int test_file_closing) hsize_t dim1[1]; int x; + /* Closing and re-opening the file takes a long time on systems without + * local disks. Don't close and reopen if express testing is enabled. + */ + if(GetTestExpress() > 1) + test_file_closing = 0; + /* Intialize rdata */ strcpy(rdata.str, "\0"); @@ -1366,6 +1372,12 @@ size2_helper(hid_t fcpl_id, int test_file_closing) dtype1_struct fill1; char fill2[DTYPE2_SIZE]; + /* Closing and re-opening the file takes a long time on systems without + * local disks. Don't close and reopen if express testing is enabled. + */ + if(GetTestExpress() > 1) + test_file_closing = 0; + /* Create a file and get its size */ file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT); CHECK_I(file_id, "H5Fcreate"); -- cgit v0.12