diff options
Diffstat (limited to 'hl/test/CMakeTests.cmake')
-rw-r--r-- | hl/test/CMakeTests.cmake | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake index 5d42b57..fda388a 100644 --- a/hl/test/CMakeTests.cmake +++ b/hl/test/CMakeTests.cmake @@ -9,29 +9,29 @@ # Macro used to add a unit test # -------------------------------------------------------------------- MACRO (HL_ADD_TEST hl_name files) - ADD_TEST (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") + add_test (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (hl_${hl_name} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") # -------------------------------------------------------------------- #-- Copy the necessary files. # -------------------------------------------------------------------- - FOREACH (h5_file ${files}) - SET (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying HL Test File ${h5_file} to ${dest}") - ADD_CUSTOM_COMMAND ( + foreach (h5_file ${files}) + set (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}") + #message (STATUS " Copying HL Test File ${h5_file} to ${dest}") + add_custom_command ( TARGET hl_${hl_name} PRE_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest} ) - ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES}) + endforeach (h5_file ${HL_REFERENCE_TEST_FILES}) ENDMACRO (HL_ADD_TEST) # Remove any output file left over from previous test run -ADD_TEST ( +add_test ( NAME hl_test-clear-objects COMMAND ${CMAKE_COMMAND} -E remove @@ -60,14 +60,14 @@ ADD_TEST ( test_packet_table.h5 test_table.h5 ) -IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test}) -ENDIF (NOT "${last_test}" STREQUAL "") -SET (last_test "hl_test-clear-objects") +if (NOT "${last_test}" STREQUAL "") + set_tests_properties (hl_test-clear-objects PROPERTIES DEPENDS ${last_test}) +endif (NOT "${last_test}" STREQUAL "") +set (last_test "hl_test-clear-objects") -HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5") -HL_ADD_TEST (test_dset_opt "") -HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri") -HL_ADD_TEST (test_lite "dtype_file.txt") -HL_ADD_TEST (test_packet "") -HL_ADD_TEST (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5") +HL_add_test (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5") +HL_add_test (test_dset_opt "") +HL_add_test (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri") +HL_add_test (test_lite "dtype_file.txt") +HL_add_test (test_packet "") +HL_add_test (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5") |