Develop cmake clean (#1971)
This commit is contained in:
@@ -16,12 +16,16 @@
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# Remove any output file left over from previous test run
|
||||
set (HL_CPP_EX_PT_CLEANFILES
|
||||
PTcppexampleFL.h5
|
||||
)
|
||||
add_test (
|
||||
NAME HL_CPP_ex_ptExampleFL-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
PTcppexampleFL.h5
|
||||
ptExampleFL.txt
|
||||
-E remove ${HL_CPP_EX_PT_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_CPP_ex_ptExampleFL-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
@@ -40,3 +44,12 @@ else ()
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (HL_CPP_ex_ptExampleFL PROPERTIES DEPENDS HL_CPP_ex_ptExampleFL-clear-objects)
|
||||
add_test (
|
||||
NAME HL_CPP_ex_ptExampleFL-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${HL_CPP_EX_PT_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_CPP_ex_ptExampleFL-clean-objects PROPERTIES
|
||||
DEPENDS HL_CPP_ex_ptExampleFL
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
@@ -15,12 +15,19 @@
|
||||
### T E S T I N G ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
|
||||
# Remove any output file left over from previous test run
|
||||
set (HL_CPP_PT_CLEANFILES
|
||||
packettest.h5
|
||||
)
|
||||
add_test (
|
||||
NAME HL_CPP_ptableTest-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${example}.txt
|
||||
-E remove ${HL_CPP_PT_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_CPP_ptableTest-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME HL_CPP_ptableTest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_ptableTest>)
|
||||
else ()
|
||||
@@ -37,3 +44,12 @@ else ()
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (HL_CPP_ptableTest PROPERTIES DEPENDS HL_CPP_ptableTest-clear-objects)
|
||||
add_test (
|
||||
NAME HL_CPP_ptableTest-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${HL_CPP_PT_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_CPP_ptableTest-clean-objects PROPERTIES
|
||||
DEPENDS HL_CPP_ptableTest
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
@@ -27,31 +27,45 @@ 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
|
||||
set (HL_EX_CLEANFILES
|
||||
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
|
||||
)
|
||||
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
|
||||
-E remove ${HL_EX_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_ex-clear-objects PROPERTIES
|
||||
FIXTURES_SETUP clear_HL_ex
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
add_test (
|
||||
NAME HL_ex-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${HL_EX_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_ex-clean-objects PROPERTIES
|
||||
FIXTURES_CLEANUP clear_HL_ex
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
set_tests_properties (HL_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_ex)
|
||||
|
||||
foreach (example ${examples})
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
|
||||
@@ -17,14 +17,28 @@
|
||||
##############################################################################
|
||||
|
||||
# Remove any output file left over from previous test run
|
||||
set (HL_FORTRAN_F90_EX_CLEANFILES
|
||||
ex_ds1.h5
|
||||
exlite.h5
|
||||
)
|
||||
add_test (
|
||||
NAME HL_FORTRAN_f90_ex-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
ex_ds1.h5
|
||||
exlite.h5
|
||||
-E remove ${HL_FORTRAN_F90_EX_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_FORTRAN_f90_ex-clear-objects PROPERTIES
|
||||
FIXTURES_SETUP clear_HL_FORTRAN_f90_ex
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
add_test (
|
||||
NAME HL_FORTRAN_f90_ex-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${HL_FORTRAN_F90_EX_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_FORTRAN_f90_ex-clean-objects PROPERTIES
|
||||
FIXTURES_CLEANUP clear_HL_FORTRAN_f90_ex
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
set_tests_properties (HL_FORTRAN_f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_f90_ex)
|
||||
|
||||
foreach (example ${examples})
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
@@ -44,5 +58,6 @@ foreach (example ${examples})
|
||||
endif ()
|
||||
set_tests_properties (HL_FORTRAN_f90_ex_${example} PROPERTIES
|
||||
FIXTURES_REQUIRED clear_HL_FORTRAN_f90_ex
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
endforeach ()
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
##############################################################################
|
||||
|
||||
set (test_hl_fortran_CLEANFILES
|
||||
dsetf1.h5
|
||||
dsetf2.h5
|
||||
dsetf3.h5
|
||||
dsetf4.h5
|
||||
dsetf5.h5
|
||||
f1img.h5
|
||||
f1tab.h5
|
||||
f2tab.h5
|
||||
tstds.h5
|
||||
dsetf1.h5
|
||||
dsetf2.h5
|
||||
dsetf3.h5
|
||||
dsetf4.h5
|
||||
dsetf5.h5
|
||||
f1img.h5
|
||||
f1tab.h5
|
||||
f2tab.h5
|
||||
tstds.h5
|
||||
)
|
||||
|
||||
# Remove any output file left over from previous test run
|
||||
@@ -34,7 +34,19 @@ add_test (
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${test_hl_fortran_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_FORTRAN_test-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_test)
|
||||
set_tests_properties (HL_FORTRAN_test-clear-objects PROPERTIES
|
||||
FIXTURES_SETUP clear_HL_FORTRAN_test
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
add_test (
|
||||
NAME HL_FORTRAN_test-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${test_hl_fortran_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_FORTRAN_test-clean-objects PROPERTIES
|
||||
FIXTURES_CLEANUP clear_HL_FORTRAN_test
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
macro (ADD_H5_FORTRAN_TEST file)
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
@@ -54,6 +66,7 @@ macro (ADD_H5_FORTRAN_TEST file)
|
||||
endif ()
|
||||
set_tests_properties (HL_FORTRAN_f90_${file} PROPERTIES
|
||||
FIXTURES_REQUIRED clear_HL_FORTRAN_test
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
endmacro ()
|
||||
|
||||
|
||||
@@ -81,7 +81,18 @@ add_test (
|
||||
NAME HL_test-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${test_hl_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_test-clear-objects PROPERTIES FIXTURES_SETUP clear_test_hl)
|
||||
set_tests_properties (HL_test-clear-objects PROPERTIES
|
||||
FIXTURES_SETUP clear_test_hl
|
||||
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
|
||||
)
|
||||
add_test (
|
||||
NAME HL_test-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${test_hl_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_test-clean-objects PROPERTIES
|
||||
FIXTURES_CLEANUP clear_test_hl
|
||||
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
|
||||
)
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Macro used to add a unit test
|
||||
|
||||
@@ -28,16 +28,24 @@ HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5" "$
|
||||
add_custom_target(gif2h5_files ALL COMMENT "Copying files needed by gif2h5 tests" DEPENDS ${gif2h5_files_list})
|
||||
|
||||
# Remove any output file left over from previous test run
|
||||
set (HL_TOOLS_CLEANFILES
|
||||
image1.gif
|
||||
image1.h5
|
||||
image.gif
|
||||
image24.gif
|
||||
)
|
||||
add_test (
|
||||
NAME HL_TOOLS-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
image1.gif
|
||||
image1.h5
|
||||
image.gif
|
||||
image24.gif
|
||||
-E remove ${HL_TOOLS_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_TOOLS-clear-objects PROPERTIES FIXTURES_SETUP clear_tools_hl)
|
||||
add_test (
|
||||
NAME HL_TOOLS-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${HL_TOOLS_CLEANFILES}
|
||||
)
|
||||
set_tests_properties (HL_TOOLS-clean-objects PROPERTIES FIXTURES_CLEANUP clear_tools_hl)
|
||||
|
||||
add_test (NAME HL_TOOLS_gif2h5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:gif2h5${tgt_file_ext}> testfiles/image1.gif image1.h5)
|
||||
set_tests_properties (HL_TOOLS_gif2h5 PROPERTIES
|
||||
|
||||
@@ -86,7 +86,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
|
||||
DEPENDS ${last_test}
|
||||
FIXTURES_REQUIRED gen_test_watch
|
||||
)
|
||||
set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
|
||||
set (last_test "H5WATCH_ARGS-h5watch-${resultfile}s")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
@@ -115,12 +115,6 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
|
||||
|
||||
macro (ADD_H5_WATCH resultfile resultcode)
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (
|
||||
NAME H5WATCH-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove ${resultfile}.h5
|
||||
)
|
||||
set_tests_properties (H5WATCH-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
|
||||
add_test (
|
||||
NAME H5WATCH-${resultfile}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
@@ -134,7 +128,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
set_tests_properties (H5WATCH-${resultfile} PROPERTIES
|
||||
DEPENDS H5WATCH-${resultfile}-clear-objects
|
||||
DEPENDS ${last_test}
|
||||
FIXTURES_REQUIRED gen_test_watch
|
||||
)
|
||||
set (last_test "H5WATCH-${resultfile}")
|
||||
@@ -164,7 +158,12 @@ set_tests_properties (H5WATCH-clearall-objects PROPERTIES FIXTURES_REQUIRED swmr
|
||||
if (last_test)
|
||||
set_tests_properties (H5WATCH-clearall-objects PROPERTIES DEPENDS ${last_test})
|
||||
endif ()
|
||||
set (last_test "H5WATCH-clearall-objects")
|
||||
set (last_test "H5WATCH-cleanall-objects")
|
||||
add_test (
|
||||
NAME H5WATCH-cleanall-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove WATCH.h5
|
||||
)
|
||||
set_tests_properties (H5WATCH-cleanall-objects PROPERTIES FIXTURES_CLEANUP swmr_vfd_check_compat)
|
||||
|
||||
#################################################################################################
|
||||
# #
|
||||
@@ -189,7 +188,7 @@ set (last_test "H5WATCH-clearall-objects")
|
||||
add_test (NAME H5WATCH-h5watchgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5watchgentest>)
|
||||
set_tests_properties (H5WATCH-h5watchgentest PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
DEPENDS "H5WATCH-clearall-objects"
|
||||
DEPENDS H5WATCH-clearall-objects
|
||||
)
|
||||
set_tests_properties (H5WATCH-h5watchgentest PROPERTIES FIXTURES_SETUP gen_test_watch)
|
||||
set_tests_properties (H5WATCH-h5watchgentest PROPERTIES FIXTURES_REQUIRED swmr_vfd_check_compat)
|
||||
|
||||
Reference in New Issue
Block a user