summaryrefslogtreecommitdiffstats
path: root/hl/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-24 16:08:47 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-24 16:08:47 (GMT)
commit34adba4a0c131afe49a75e8e7d92f1e986c1b540 (patch)
tree8e196a9fab1502a45d0d05a190fb1f90ec94dbed /hl/examples
parentab0b1a00aff3bee4a3cf0d31614368935c435b6f (diff)
downloadhdf5-34adba4a0c131afe49a75e8e7d92f1e986c1b540.zip
hdf5-34adba4a0c131afe49a75e8e7d92f1e986c1b540.tar.gz
hdf5-34adba4a0c131afe49a75e8e7d92f1e986c1b540.tar.bz2
HDFFV-10845, 10529 and CMake changes from develop
Diffstat (limited to 'hl/examples')
-rw-r--r--hl/examples/CMakeTests.cmake63
1 files changed, 32 insertions, 31 deletions
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index c1fd6c2..d0f9018 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -26,41 +26,39 @@ foreach (h5_file ${HDF5_TEST_FILES})
endforeach ()
add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_ex_ds1 tests" DEPENDS ${hl_ex_ex_ds1_files_list})
- # Remove any output file left over from previous test run
- add_test (
- NAME HL_ex-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ex_lite1.h5
- ex_lite2.h5
- ex_lite3.h5
- packet_table_FLexample.h5
- ex_image1.h5
- ex_image2.h5
- ex_table_01.h5
- ex_table_02.h5
- ex_table_03.h5
- ex_table_04.h5
- ex_table_05.h5
- ex_table_06.h5
- ex_table_07.h5
- ex_table_08.h5
- ex_table_09.h5
- ex_table_10.h5
- ex_table_11.h5
- ex_table_12.h5
- ex_ds1.h5
- )
- if (last_test)
- set_tests_properties (HL_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "HL_ex-clear-objects")
+# Remove any output file left over from previous test run
+add_test (
+ NAME HL_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ex_lite1.h5
+ ex_lite2.h5
+ ex_lite3.h5
+ packet_table_FLexample.h5
+ ex_image1.h5
+ ex_image2.h5
+ ex_table_01.h5
+ ex_table_02.h5
+ ex_table_03.h5
+ ex_table_04.h5
+ ex_table_05.h5
+ ex_table_06.h5
+ ex_table_07.h5
+ ex_table_08.h5
+ ex_table_09.h5
+ ex_table_10.h5
+ ex_table_11.h5
+ ex_table_12.h5
+ ex_ds1.h5
+)
+set_tests_properties (HL_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_ex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME HL_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
+ add_test (NAME HL_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_ex_${example}>)
else ()
add_test (NAME HL_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:hl_ex_${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -72,7 +70,10 @@ foreach (example ${examples})
)
endif ()
if (last_test)
- set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (HL_ex_${example} PROPERTIES
+ DEPENDS ${last_test}
+ FIXTURES_REQUIRED clear_HL_ex
+ )
endif ()
set (last_test "HL_ex_${example}")
endforeach ()