diff options
Diffstat (limited to 'test/ShellTests.cmake')
-rw-r--r-- | test/ShellTests.cmake | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake index 732091b..a6fda87 100644 --- a/test/ShellTests.cmake +++ b/test/ShellTests.cmake @@ -15,8 +15,30 @@ ### T E S T I N G S H E L L S C R I P T S ### ############################################################################## -if (UNIX) +find_program (PWSH NAMES pwsh powershell) +if (PWSH) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test") + set (srcdir ${HDF5_TEST_SOURCE_DIR}) + set (bindir ${CMAKE_TEST_OUTPUT_DIRECTORY}) + set (testdir ${HDF5_TEST_BINARY_DIR}/H5TEST) + configure_file(${HDF5_TEST_SOURCE_DIR}/testswmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.ps1 @ONLY) + # test commented out as currently the programs are not allowing another access to the data file + #add_test (H5SHELL-testswmr ${PWSH} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.ps1) + #set_tests_properties (H5SHELL-testswmr PROPERTIES + # ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" + # WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + #) + configure_file(${HDF5_TEST_SOURCE_DIR}/testvdsswmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.ps1 @ONLY) + # test commented out as currently the programs are not allowing another access to the data file + #add_test (H5SHELL-testvdsswmr ${PWSH} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.ps1) + #set_tests_properties (H5SHELL-testvdsswmr PROPERTIES + # ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" + # WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + #) +elseif (UNIX) find_program (SH_PROGRAM bash) if (SH_PROGRAM) set (srcdir ${HDF5_TEST_SOURCE_DIR}) @@ -35,8 +57,6 @@ if (UNIX) ############################################################################## # copy test programs to test dir ############################################################################## - #shell script creates dir - #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test") add_custom_command ( TARGET accum_swmr_reader POST_BUILD @@ -44,15 +64,6 @@ if (UNIX) ARGS -E copy_if_different "${HDF5_SOURCE_DIR}/bin/output_filter.sh" "${HDF5_TEST_BINARY_DIR}/H5TEST/bin/output_filter.sh" ) - #shell script creates dir - #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test") - - #shell script creates dir - #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test") - - #shell script creates dir - #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test") - ############################################################################## ############################################################################## ### A D D I T I O N A L T E S T S ### @@ -108,6 +119,5 @@ if (UNIX) ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) - endif () endif () |