summaryrefslogtreecommitdiffstats
path: root/tools/test/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/misc')
-rw-r--r--tools/test/misc/CMakeLists.txt4
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake18
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake6
-rw-r--r--tools/test/misc/CMakeTestsRepart.cmake10
4 files changed, 23 insertions, 15 deletions
diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt
index f5e3ea3..a250222 100644
--- a/tools/test/misc/CMakeLists.txt
+++ b/tools/test/misc/CMakeLists.txt
@@ -15,7 +15,7 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5repart_gentest PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
endif ()
set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools)
- #add_test (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
+ #add_test (NAME h5repart_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart_gentest>)
add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c)
target_include_directories (h5clear_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -27,7 +27,7 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5clear_gentest PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
endif ()
set_target_properties (h5clear_gentest PROPERTIES FOLDER tools)
- #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $<TARGET_FILE:h5clear_gentest>)
+ #add_test (NAME H5CLEAR-h5clear_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear_gentest>)
add_subdirectory (vds)
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index c7b2fe9..99650e6 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -106,6 +106,7 @@
add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
@@ -134,6 +135,7 @@
add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
@@ -171,6 +173,7 @@
add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
@@ -207,6 +210,7 @@
add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
@@ -225,7 +229,7 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5CLEAR_RET-${testname}
- COMMAND $<TARGET_FILE:h5clear${tgt_ext}> ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> ${ARGN}
)
set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WILL_FAIL "${resultcode}")
@@ -261,6 +265,7 @@
add_test (
NAME H5CLEAR_FILESIZE_CMP-${testname}_before_size
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
@@ -273,12 +278,12 @@
if (NOT ${incr_size} MATCHES "NONE")
add_test (
NAME H5CLEAR_FILESIZE_INCR-${testname}
- COMMAND $<TARGET_FILE:h5clear${tgt_ext}> --increment=${incr_size} ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> --increment=${incr_size} ${testname}.h5
)
else ()
add_test (
NAME H5CLEAR_FILESIZE_INCR-${testname}
- COMMAND $<TARGET_FILE:h5clear${tgt_ext}> --increment ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> --increment ${testname}.h5
)
endif ()
set_tests_properties (H5CLEAR_FILESIZE_INCR-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
@@ -287,6 +292,7 @@
add_test (
NAME H5CLEAR_FILESIZE_CMP-${testname}_after_size
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
@@ -315,7 +321,7 @@
# Initial file open fails OR
# File open succeeds because the library does not check status_flags for file with < v3 superblock
- add_test (NAME H5CLEAR-clr_open_chk-${testname}_${resultcode} COMMAND $<TARGET_FILE:clear_open_chk> ${testfile}.h5)
+ add_test (NAME H5CLEAR-clr_open_chk-${testname}_${resultcode} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:clear_open_chk> ${testfile}.h5)
set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WILL_FAIL "${resultcode}")
set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (last_test)
@@ -323,10 +329,10 @@
endif ()
# After "h5clear" the file, the subsequent file open succeeds
- add_test (NAME H5CLEAR-h5clr-${testname} COMMAND $<TARGET_FILE:h5clear${tgt_ext}> -s ${testfile}.h5)
+ add_test (NAME H5CLEAR-h5clr-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s ${testfile}.h5)
set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES DEPENDS H5CLEAR-clr_open_chk-${testname}_${resultcode})
set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- add_test (NAME H5CLEAR-clr_open_chk-${testname} COMMAND $<TARGET_FILE:clear_open_chk> ${testfile}.h5)
+ add_test (NAME H5CLEAR-clr_open_chk-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:clear_open_chk> ${testfile}.h5)
set_tests_properties (H5CLEAR-clr_open_chk-${testname} PROPERTIES DEPENDS H5CLEAR-h5clr-${testname})
set_tests_properties (H5CLEAR-clr_open_chk-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
set (last_test "H5CLEAR-clr_open_chk-${testname}")
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index db1f805..37d87ca 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -75,7 +75,7 @@
add_test (
NAME H5MKGRP-${resultfile}
- COMMAND $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
)
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -87,6 +87,7 @@
add_test (
NAME H5MKGRP-${resultfile}-h5ls
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
-D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
@@ -102,7 +103,7 @@
macro (ADD_H5_CMP resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
+ add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp> ${ARGN})
else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
@@ -116,6 +117,7 @@
add_test (
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake
index 53949a2..24b6004 100644
--- a/tools/test/misc/CMakeTestsRepart.cmake
+++ b/tools/test/misc/CMakeTestsRepart.cmake
@@ -80,31 +80,31 @@
set_tests_properties (H5REPART-clearall-objects PROPERTIES FIXTURES_SETUP clear_testrepart)
# repartition family member size to 20,000 bytes.
- add_test (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5)
+ add_test (NAME H5REPART-h5repart_20K COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5)
set_tests_properties (H5REPART-h5repart_20K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# repartition family member size to 5 KB.
- add_test (NAME H5REPART-h5repart_5K COMMAND $<TARGET_FILE:h5repart${tgt_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5)
+ add_test (NAME H5REPART-h5repart_5K COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5)
set_tests_properties (H5REPART-h5repart_5K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# convert family file to sec2 file of 20,000 bytes
- add_test (NAME H5REPART-h5repart_single COMMAND $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5)
+ add_test (NAME H5REPART-h5repart_single COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5)
set_tests_properties (H5REPART-h5repart_single PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# convert family file to sec2 file of 20,000 bytes (old argument)
- add_test (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
+ add_test (NAME H5REPART-h5repart_sec2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
set_tests_properties (H5REPART-h5repart_sec2 PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# test the output files repartitioned above.
- add_test (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
+ add_test (NAME H5REPART-h5repart_test COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart_test>)
set_tests_properties (H5REPART-h5repart_test PROPERTIES
DEPENDS "H5REPART-h5repart_20K;H5REPART-h5repart_5K;H5REPART-h5repart_single;H5REPART-h5repart_sec2"
)