Fix list var

This commit is contained in:
Allen Byrne 2018-02-27 14:04:34 -06:00
parent 90f01d5b16
commit 93744615f9
4 changed files with 58 additions and 118 deletions

View File

@ -269,7 +269,7 @@ set (H5_TESTS_MULTIPLE
)
# Only build single source tests here
foreach (test ${H5_TESTS})
if (NOT "${test}" IN_LIST H5_TESTS_MULTIPLE)
if (NOT ${test} IN_LIST H5_TESTS_MULTIPLE)
ADD_H5_EXE(${test})
endif ()
endforeach ()

View File

@ -544,11 +544,12 @@ add_test (NAME H5TEST-clear-objects
)
set (H5TEST_SEPARATE_TESTS
testhdf5
cache
cache_image
)
foreach (test ${H5TEST_TESTS})
if (NOT "${test}" IN_LIST H5TEST_SEPARATE_TESTS)
foreach (test ${H5_TESTS})
if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
set_tests_properties (H5TEST-${test} PROPERTIES
@ -598,8 +599,8 @@ if (BUILD_SHARED_LIBS)
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
foreach (test ${H5TEST_TESTS})
if (NOT "${test}" IN_LIST H5TEST_SEPARATE_TESTS)
foreach (test ${H5_TESTS})
if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
if ("${test}" STREQUAL "big" AND CYGWIN)
add_test (NAME H5TEST-shared-${test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"

View File

@ -237,7 +237,7 @@ endif ()
macro (ADD_VFD_TEST vfdname resultcode)
foreach (test ${H5_TESTS})
if (NOT "${test}" IN_LIST H5_VFD_SKIP_TESTS)
if (NOT ${test} IN_LIST H5_VFD_SKIP_TESTS)
if (WIN32)
CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
else ()

View File

@ -76,7 +76,6 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/bounds_latest_latest.h5
# fsm
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_aggr.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_nopersist.h5
@ -465,52 +464,60 @@
endif ()
endmacro ()
macro (ADD_H5_VERIFY_TEST testname resultcode testfile testdset testfilter)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
testfiles/out-${testname}.${testfile}
testfiles/${testfile}-${testname}-v.out
testfiles/${testfile}-${testname}-v.out.err
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
if ("${resultcode}" STREQUAL "0")
macro (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
else ()
if ("${testfilter}" STREQUAL "CHUNKED")
set (nottestfilter "(CONTIGUOUS|COMPACT)")
endif ()
else ()
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
testfiles/out-${testname}.${testfile}
testfiles/${testfile}-${testname}-v.out
testfiles/${testfile}-${testname}-v.out.err
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
if ("${testfilter}" STREQUAL "CONTIGUOUS")
set (nottestfilter "(CHUNK|COMPACT)")
endif ()
if ("${testfilter}" STREQUAL "COMPACT")
set (nottestfilter "(CONTIGUOUS|CHUNK)")
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
if ("${resultcode}" STREQUAL "0")
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
else ()
if ("${testfilter}" STREQUAL "CHUNKED")
set (nottestfilter "(CONTIGUOUS|COMPACT)")
endif ()
if ("${testfilter}" STREQUAL "CONTIGUOUS")
set (nottestfilter "(CHUNK|COMPACT)")
endif ()
if ("${testfilter}" STREQUAL "COMPACT")
set (nottestfilter "(CONTIGUOUS|CHUNK)")
endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
@ -575,62 +582,6 @@
endif ()
endmacro ()
macro (ADD_H5_VERIFY_SUPERBLOCK testname testfile lowbound highbound superblock)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
testfiles/out-${testname}.${testfile}
testfiles/${testfile}-${testname}-v.out
testfiles/${testfile}-${testname}-v.out.err
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}
COMMAND $<TARGET_FILE:h5repack> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects)
add_test (
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-H;-B;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=SUPERBLOCK_VERSION ${superblock}"
-D "TEST_REFERENCE=SUPERBLOCK_VERSION ${superblock}"
-P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname})
endif ()
endmacro ()
macro (ADD_H5_VERIFY_INVALIDBOUNDS testname resultcode lowbound highbound)
add_test (
NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
testfiles/out-${testname}.${testfile}
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
NAME ADD_H5_VERIFY_INVALIDBOUNDS-${testname}
COMMAND $<TARGET_FILE:h5repack> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (
ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} PROPERTIES
DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects
WILL_FAIL "true"
)
endif ()
endmacro ()
macro (ADD_H5_TEST_META testname testfile)
# Remove any output file left over from previous test run
add_test (
@ -1419,18 +1370,6 @@
endif ()
ADD_H5_VERIFY_VDS (vds_conti ${TESTTYPE} 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI)
##############################################################################
### V E R S I O N B O U N D S T E S T S
##############################################################################
# -j 0 -k 2, superblock will be 0
ADD_H5_VERIFY_SUPERBLOCK SB_IS_0 h5repack_layout.h5 0 2 0
# -j 1 -k 2, superblock will be 2
ADD_H5_VERIFY_SUPERBLOCK SB_IS_2 h5repack_layout.h5 1 2 2
# -j 2 -k 2, superblock will be 3
ADD_H5_VERIFY_SUPERBLOCK SB_IS_3 h5repack_layout.h5 2 2 3
# -j 0 -k 1, file cannot be opened
ADD_H5_VERIFY_INVALIDBOUNDS latest_latest_invalid bounds_latest_latest.h5 0 1
##############################################################################
### P L U G I N T E S T S
##############################################################################