diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2018-11-14 21:37:31 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2018-11-14 21:37:31 (GMT) |
commit | 3edd97731e90b7fc3a378e2c6e9c043a23327d93 (patch) | |
tree | 448c0dcbe6807d21e660f89b5845a65ce2828062 /tools/test | |
parent | ca1788e0823b6915eec785de3a880987eae54a2a (diff) | |
download | hdf5-3edd97731e90b7fc3a378e2c6e9c043a23327d93.zip hdf5-3edd97731e90b7fc3a378e2c6e9c043a23327d93.tar.gz hdf5-3edd97731e90b7fc3a378e2c6e9c043a23327d93.tar.bz2 |
Renamed h5repart's -family_to_sec2 to -family_to_single.
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/misc/CMakeTestsRepart.cmake | 5 | ||||
-rw-r--r-- | tools/test/misc/repart_test.c | 21 | ||||
-rw-r--r-- | tools/test/misc/testh5repart.sh.in | 6 |
3 files changed, 23 insertions, 9 deletions
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake index 37da903..830de11 100644 --- a/tools/test/misc/CMakeTestsRepart.cmake +++ b/tools/test/misc/CMakeTestsRepart.cmake @@ -68,6 +68,7 @@ scd_family00001.h5 scd_family00002.h5 scd_family00003.h5 + family_to_single.h5 family_to_sec2.h5 ) if (NOT "${last_test}" STREQUAL "") @@ -84,6 +85,10 @@ set_tests_properties (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects) # convert family file to sec2 file of 20,000 bytes + add_test (NAME H5REPART-h5repart_single COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5) + set_tests_properties (H5REPART-h5repart_single PROPERTIES DEPENDS H5REPART-clearall-objects) + + # convert family file to sec2 file of 20,000 bytes (old argument) add_test (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5) set_tests_properties (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects) diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c index 4016ee8..b8e0292 100644 --- a/tools/test/misc/repart_test.c +++ b/tools/test/misc/repart_test.c @@ -26,12 +26,13 @@ const char *FILENAME[] = { "fst_family%05d.h5", "scd_family%05d.h5", + "family_to_single.h5", "family_to_sec2.h5", NULL }; herr_t test_family_h5repart_opens(void); -herr_t test_sec2_h5repart_opens(void); +herr_t test_single_h5repart_opens(void); /*------------------------------------------------------------------------- @@ -90,23 +91,28 @@ error: /*------------------------------------------------------------------------- - * Function: test_sec2_h5repart_opens + * Function: test_single_h5repart_opens * - * Purpose: Tries to reopen a sec2 file. + * Purpose: Tries to reopen a single file. * * Return: SUCCEED/FAIL * *------------------------------------------------------------------------- */ herr_t -test_sec2_h5repart_opens(void) +test_single_h5repart_opens(void) { hid_t fid = -1; - /* open the sec2 file */ + /* open the single file */ if ((fid = H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT)) < 0) goto error; + if (H5Fclose(fid) < 0) + goto error; + /* open the single file (created using the old argument) */ + if ((fid = H5Fopen(FILENAME[3], H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + goto error; if (H5Fclose(fid) < 0) goto error; @@ -119,7 +125,7 @@ error: return FAIL; -} /* end test_sec2_h5repart_opens() */ +} /* end test_single_h5repart_opens() */ /*------------------------------------------------------------------------- @@ -137,7 +143,7 @@ main(void) int nerrors = 0; nerrors += test_family_h5repart_opens() < 0 ? 1 : 0; - nerrors += test_sec2_h5repart_opens() < 0 ? 1 : 0; + nerrors += test_single_h5repart_opens() < 0 ? 1 : 0; if (nerrors) goto error; @@ -150,3 +156,4 @@ error: nerrors, 1 == nerrors ? "" : "S"); HDexit(EXIT_FAILURE); } /* end main() */ + diff --git a/tools/test/misc/testh5repart.sh.in b/tools/test/misc/testh5repart.sh.in index 594d37e..143f607 100644 --- a/tools/test/misc/testh5repart.sh.in +++ b/tools/test/misc/testh5repart.sh.in @@ -171,7 +171,9 @@ COPY_TESTFILES_TO_TESTDIR TOOLTEST -m 20000 family_file%05d.h5 fst_family%05d.h5 # repartition family member size to 5 KB. TOOLTEST -m 5k family_file%05d.h5 scd_family%05d.h5 -# convert family file to sec2 file of 20,000 bytes +# convert family file to single file of 20,000 bytes +TOOLTEST -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5 +# convert family file to single file of 20,000 bytes (old argument) TOOLTEST -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5 # test the output files repartitioned above. @@ -183,7 +185,7 @@ CLEAN_TESTFILES_AND_TESTDIR if test -z "$HDF5_NOCLEANUP"; then cd $actual_dir - rm -f fst_family*.h5 scd_family*.h5 family_to_sec2.h5 + rm -f fst_family*.h5 scd_family*.h5 family_to_single.h5 family_to_sec2.h5 fi if test $nerrors -eq 0 ; then |