summaryrefslogtreecommitdiffstats
path: root/test/ShellTests.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-08-19 21:03:05 (GMT)
committerGitHub <noreply@github.com>2021-08-19 21:03:05 (GMT)
commit3600d33f10db1d520f360930c40bf99e282af101 (patch)
tree4d3bbefa53b4e4509ea8df5a36af5ea7337a2f41 /test/ShellTests.cmake
parent564380d176ae71d9f4ece9df51957e3f817be45d (diff)
downloadhdf5-3600d33f10db1d520f360930c40bf99e282af101.zip
hdf5-3600d33f10db1d520f360930c40bf99e282af101.tar.gz
hdf5-3600d33f10db1d520f360930c40bf99e282af101.tar.bz2
CMake should use the output dir programs for shell scripts (#928)
Diffstat (limited to 'test/ShellTests.cmake')
-rw-r--r--test/ShellTests.cmake118
1 files changed, 4 insertions, 114 deletions
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index 812121e..9614152 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -19,7 +19,8 @@ if (UNIX)
find_program (SH_PROGRAM bash)
if (SH_PROGRAM)
-
+ set (srcdir ${HDF5_TEST_SOURCE_DIR})
+ set (bindir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
##############################################################################
# configure scripts to test dir
##############################################################################
@@ -33,13 +34,8 @@ if (UNIX)
##############################################################################
# copy test programs to test dir
##############################################################################
- add_custom_command (
- TARGET swmr_check_compat_vfd
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_check_compat_vfd>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_check_compat_vfd"
- )
-
+ #shell script creates dir
+ #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
add_custom_command (
TARGET swmr_check_compat_vfd
POST_BUILD
@@ -47,118 +43,12 @@ if (UNIX)
ARGS -E copy_if_different "${HDF5_SOURCE_DIR}/bin/output_filter.sh" "${HDF5_TEST_BINARY_DIR}/H5TEST/bin/output_filter.sh"
)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
- add_custom_command (
- TARGET flushrefresh
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:flushrefresh>" "${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh"
- )
-
#shell script creates dir
#file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test")
- add_custom_command (
- TARGET use_append_mchunks
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:use_append_mchunks>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_append_mchunks"
- )
- add_custom_command (
- TARGET use_disable_mdc_flushes
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:use_disable_mdc_flushes>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_disable_mdc_flushes"
- )
- add_custom_command (
- TARGET twriteorder
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:twriteorder>" "${HDF5_TEST_BINARY_DIR}/H5TEST/twriteorder"
- )
- add_custom_command (
- TARGET use_append_chunk
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:use_append_chunk>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_append_chunk"
- )
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
- add_custom_command (
- TARGET swmr_generator
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_generator>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_generator"
- )
- add_custom_command (
- TARGET swmr_start_write
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_start_write>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_start_write"
- )
- add_custom_command (
- TARGET swmr_reader
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_reader"
- )
- add_custom_command (
- TARGET swmr_writer
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_writer"
- )
- add_custom_command (
- TARGET swmr_remove_reader
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_remove_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_remove_reader"
- )
- add_custom_command (
- TARGET swmr_remove_writer
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_remove_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_remove_writer"
- )
- add_custom_command (
- TARGET swmr_addrem_writer
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_addrem_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_addrem_writer"
- )
- add_custom_command (
- TARGET swmr_sparse_reader
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_sparse_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_sparse_reader"
- )
- add_custom_command (
- TARGET swmr_sparse_writer
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:swmr_sparse_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_sparse_writer"
- )
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
- add_custom_command (
- TARGET vds_swmr_gen
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_gen>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_gen"
- )
- add_custom_command (
- TARGET vds_swmr_writer
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_writer"
- )
- add_custom_command (
- TARGET vds_swmr_reader
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_reader"
- )
-
-
##############################################################################
##############################################################################