diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-10-20 17:57:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-20 17:57:09 (GMT) |
commit | b5c63fb3fe6ee04b41d80368b406b5d45502ba00 (patch) | |
tree | e253a81461fa11533096795ee5064a827651325d /tools/test/h5format_convert | |
parent | 630d6e27c956859ff5c0d7a61df3c095fbd7c86b (diff) | |
download | hdf5-b5c63fb3fe6ee04b41d80368b406b5d45502ba00.zip hdf5-b5c63fb3fe6ee04b41d80368b406b5d45502ba00.tar.gz hdf5-b5c63fb3fe6ee04b41d80368b406b5d45502ba00.tar.bz2 |
Test scripts now execute in-source with creation of tmp dir (#3723)
Fixes a few issues created in #3580:
* Fixes a problem where committed tools test files were deleted when cleaning after an in-source build
* Fixes issues with test file paths in Autotools tools test scripts
Diffstat (limited to 'tools/test/h5format_convert')
16 files changed, 27 insertions, 20 deletions
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake index 3046521..ab14a8c 100644 --- a/tools/test/h5format_convert/CMakeTests.cmake +++ b/tools/test/h5format_convert/CMakeTests.cmake @@ -378,11 +378,11 @@ COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>" - -D "TEST_ARGS:STRING=-BH;./testfiles/${testname}-tmp.h5" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=testfiles/${testname}_chk.out" + -D "TEST_ARGS:STRING=-BH;${testname}-tmp.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testname}_chk.out" -D "TEST_EXPECT=0" - -D "TEST_REFERENCE=testfiles/${testname}.ddl" + -D "TEST_REFERENCE=${testname}.ddl" -P "${HDF_RESOURCES_DIR}/runTest.cmake" ) set_tests_properties (H5FC_H5DUMP_CHECK-${testname}-dump PROPERTIES diff --git a/tools/test/h5format_convert/expected/h5fc_ext1_f.ddl b/tools/test/h5format_convert/expected/h5fc_ext1_f.ddl index f788913..98806a7 100644 --- a/tools/test/h5format_convert/expected/h5fc_ext1_f.ddl +++ b/tools/test/h5format_convert/expected/h5fc_ext1_f.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/h5fc_ext1_f-tmp.h5" { +HDF5 "h5fc_ext1_f-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/h5fc_ext1_i.ddl b/tools/test/h5format_convert/expected/h5fc_ext1_i.ddl index 6564031..0372910 100644 --- a/tools/test/h5format_convert/expected/h5fc_ext1_i.ddl +++ b/tools/test/h5format_convert/expected/h5fc_ext1_i.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/h5fc_ext1_i-tmp.h5" { +HDF5 "h5fc_ext1_i-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/h5fc_ext1_s.ddl b/tools/test/h5format_convert/expected/h5fc_ext1_s.ddl index 746de2b..f97ebf3 100644 --- a/tools/test/h5format_convert/expected/h5fc_ext1_s.ddl +++ b/tools/test/h5format_convert/expected/h5fc_ext1_s.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/h5fc_ext1_s-tmp.h5" { +HDF5 "h5fc_ext1_s-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/h5fc_ext2_if.ddl b/tools/test/h5format_convert/expected/h5fc_ext2_if.ddl index 57781ec..003defc 100644 --- a/tools/test/h5format_convert/expected/h5fc_ext2_if.ddl +++ b/tools/test/h5format_convert/expected/h5fc_ext2_if.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/h5fc_ext2_if-tmp.h5" { +HDF5 "h5fc_ext2_if-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/h5fc_ext2_is.ddl b/tools/test/h5format_convert/expected/h5fc_ext2_is.ddl index 8fd061d..6b5d0d6 100644 --- a/tools/test/h5format_convert/expected/h5fc_ext2_is.ddl +++ b/tools/test/h5format_convert/expected/h5fc_ext2_is.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/h5fc_ext2_is-tmp.h5" { +HDF5 "h5fc_ext2_is-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/h5fc_ext2_sf.ddl b/tools/test/h5format_convert/expected/h5fc_ext2_sf.ddl index 435ed46..47e8c3b 100644 --- a/tools/test/h5format_convert/expected/h5fc_ext2_sf.ddl +++ b/tools/test/h5format_convert/expected/h5fc_ext2_sf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/h5fc_ext2_sf-tmp.h5" { +HDF5 "h5fc_ext2_sf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/h5fc_ext3_isf.ddl b/tools/test/h5format_convert/expected/h5fc_ext3_isf.ddl index 57a78d3..bd7058a 100644 --- a/tools/test/h5format_convert/expected/h5fc_ext3_isf.ddl +++ b/tools/test/h5format_convert/expected/h5fc_ext3_isf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/h5fc_ext3_isf-tmp.h5" { +HDF5 "h5fc_ext3_isf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/old_h5fc_ext1_f.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext1_f.ddl index 45fa3fb..420191b 100644 --- a/tools/test/h5format_convert/expected/old_h5fc_ext1_f.ddl +++ b/tools/test/h5format_convert/expected/old_h5fc_ext1_f.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/old_h5fc_ext1_f-tmp.h5" { +HDF5 "old_h5fc_ext1_f-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/old_h5fc_ext1_i.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext1_i.ddl index 67a7116..1ea1663 100644 --- a/tools/test/h5format_convert/expected/old_h5fc_ext1_i.ddl +++ b/tools/test/h5format_convert/expected/old_h5fc_ext1_i.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/old_h5fc_ext1_i-tmp.h5" { +HDF5 "old_h5fc_ext1_i-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 1 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/old_h5fc_ext1_s.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext1_s.ddl index 7f67d9f..eeaece7 100644 --- a/tools/test/h5format_convert/expected/old_h5fc_ext1_s.ddl +++ b/tools/test/h5format_convert/expected/old_h5fc_ext1_s.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/old_h5fc_ext1_s-tmp.h5" { +HDF5 "old_h5fc_ext1_s-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/old_h5fc_ext2_if.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext2_if.ddl index 350d3ba..40a7f69 100644 --- a/tools/test/h5format_convert/expected/old_h5fc_ext2_if.ddl +++ b/tools/test/h5format_convert/expected/old_h5fc_ext2_if.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/old_h5fc_ext2_if-tmp.h5" { +HDF5 "old_h5fc_ext2_if-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/old_h5fc_ext2_is.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext2_is.ddl index 6b2b2c3..d83042a 100644 --- a/tools/test/h5format_convert/expected/old_h5fc_ext2_is.ddl +++ b/tools/test/h5format_convert/expected/old_h5fc_ext2_is.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/old_h5fc_ext2_is-tmp.h5" { +HDF5 "old_h5fc_ext2_is-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/old_h5fc_ext2_sf.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext2_sf.ddl index 4a038e3..4cc7b2f 100644 --- a/tools/test/h5format_convert/expected/old_h5fc_ext2_sf.ddl +++ b/tools/test/h5format_convert/expected/old_h5fc_ext2_sf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/old_h5fc_ext2_sf-tmp.h5" { +HDF5 "old_h5fc_ext2_sf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/expected/old_h5fc_ext3_isf.ddl b/tools/test/h5format_convert/expected/old_h5fc_ext3_isf.ddl index 602627f..e3bb994 100644 --- a/tools/test/h5format_convert/expected/old_h5fc_ext3_isf.ddl +++ b/tools/test/h5format_convert/expected/old_h5fc_ext3_isf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/old_h5fc_ext3_isf-tmp.h5" { +HDF5 "old_h5fc_ext3_isf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in index 4ba46cb..756156e 100644 --- a/tools/test/h5format_convert/testh5fc.sh.in +++ b/tools/test/h5format_convert/testh5fc.sh.in @@ -62,7 +62,7 @@ SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/test/h5import/testfiles" SRC_H5FORMCONV_TESTFILES="$SRC_TOOLS/test/h5format_convert/testfiles" SRC_H5FORMCONV_OUTFILES="$SRC_TOOLS/test/h5format_convert/expected" -TESTDIR=./testfiles +TESTDIR=./tmp test -d $TESTDIR || mkdir $TESTDIR # Copy the testfile to a temporary file for testing as h5format_convert is changing the file in place @@ -419,8 +419,15 @@ H5DUMP_CHECK() { actual="$TESTDIR/`basename $2 .ddl`.out" actual_err="$TESTDIR/`basename $2 .ddl`.err" testfile="`basename $2 .ddl`-tmp.h5" - $RUNSERIAL $H5DUMP_BIN -BH $TESTDIR/$testfile > $actual 2>$actual_err + # Run test. + ( + cd $TESTDIR + $RUNSERIAL $H5DUMP_BIN -BH $testfile + ) >$actual 2>$actual_err cat $actual_err >> $actual + cp $actual $actual_sav + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err # Compare output COMPARE_OUT $expect $actual |