summaryrefslogtreecommitdiffstats
path: root/test/ShellTests.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-12-08 17:21:15 (GMT)
committerGitHub <noreply@github.com>2021-12-08 17:21:15 (GMT)
commit83cf2cb15b15bf7543d9fa750ec1aeb8de8ea3b5 (patch)
tree7576f25f0193a24e8d9e226d7ab9ec38953edd01 /test/ShellTests.cmake
parentabb05bce6e762aa1e3f93a67c39a63b4fa0762cf (diff)
downloadhdf5-83cf2cb15b15bf7543d9fa750ec1aeb8de8ea3b5.zip
hdf5-83cf2cb15b15bf7543d9fa750ec1aeb8de8ea3b5.tar.gz
hdf5-83cf2cb15b15bf7543d9fa750ec1aeb8de8ea3b5.tar.bz2
Convert vds swmr test script to powershell (#1245)
* Convert SWMR shell scripts to Windows powershell. * Use $LastExitCode instead of $? in script * Prevent execution in a different window * Github #969 Use stdout instead of file for configure check (#1089) * Use stdout instead of file for configure check * Make change requested by #1157 * Change fortran to use stderr for configure * Correct typo * remove obsolete file check * Fortran statement fix * Don't allow H5Pset(get)_all_coll_metadata_ops for DXPLs (#1201) * Fixes const warnings in H5ES package (#1211) * Quiets a 'set but not used' warning in h5diff_array.c (#1210) * Convert vds swmr test script to powershell * Enable vdsswmr powershell test * Add configure vdsswmr statement * Correct powershell script vars * Convert SWMR shell scripts to Windows powershell. * Use $LastExitCode instead of $? in script * Prevent execution in a different window * Github #969 Use stdout instead of file for configure check (#1089) * Use stdout instead of file for configure check * Make change requested by #1157 * Change fortran to use stderr for configure * Correct typo * remove obsolete file check * Fortran statement fix * Convert vds swmr test script to powershell * Enable vdsswmr powershell test * Add configure vdsswmr statement * Correct powershell script vars * Cleanup review issues * Fix variable assignment * Change the wait function to pass in the path * Disable actual test execution until programs fixed * Adjust copyright text * Fix spelling Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Diffstat (limited to 'test/ShellTests.cmake')
-rw-r--r--test/ShellTests.cmake36
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 ()