File tree Expand file tree Collapse file tree 5 files changed +32
-3
lines changed Expand file tree Collapse file tree 5 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1+ macro (add_installation_script_test name path )
2+
3+ # Copy the source to the binary tree
4+ configure_file (
5+ ${CMAKE_CURRENT_SOURCE_DIR} /${path} /${name}
6+ ${CMAKE_CURRENT_BINARY_DIR} /${path} /${name}
7+ COPYONLY
8+ )
9+ configure_file (
10+ ${CMAKE_CURRENT_SOURCE_DIR} /${path} /${name} -usage
11+ ${CMAKE_CURRENT_BINARY_DIR} /${path} /${name} -usage
12+ COPYONLY
13+ )
14+ set (harness "${CMAKE_BINARY_DIR} /staging/test-${name} .sh" )
15+ install (
16+ FILES "${harness} "
17+ PERMISSIONS WORLD_EXECUTE WORLD_READ WORLD_WRITE OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ GROUP_WRITE
18+ DESTINATION ${CMAKE_BINARY_DIR} /${path}
19+ )
20+ file (WRITE "${harness} " "#!/bin/bash\n " )
21+ file (APPEND "${harness} " "cd ${CMAKE_BINARY_DIR} /${path} \n " )
22+ file (APPEND "${harness} " "OPENCOARRAYS_SRC_DIR=${CMAKE_SOURCE_DIR} ./${name} \n " )
23+ add_test (NAME ${name} COMMAND "${CMAKE_CURRENT_BINARY_DIR} /${path} /test-${name} .sh" )
24+ #set_property(TEST ${name} PROPERTY PASS_REGULAR_EXPRESSION "Test passed.")
25+ endmacro (add_installation_script_test)
Original file line number Diff line number Diff line change @@ -412,3 +412,6 @@ else()
412412 add_test (co_reduce_extension ${tests_root} /unit/extensions/test -co_reduce-extension.sh)
413413 set_property (TEST co_reduce_extension PROPERTY PASS_REGULAR_EXPRESSION "Test passed." )
414414endif ()
415+
416+ include (AddInstallationScriptTest.cmake )
417+ add_installation_script_test(installation-scripts.sh src/tests/installation/)
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ endif()
1717
1818add_subdirectory (integration)
1919add_subdirectory (unit)
20- # add_subdirectory(performance )
20+ add_subdirectory (installation )
Original file line number Diff line number Diff line change 1+ configure_file (${CMAKE_CURRENT_SOURCE_DIR} /installation-scripts.sh ${CMAKE_CURRENT_BINARY_DIR} /installation-scripts.sh COPYONLY )
Original file line number Diff line number Diff line change 8282# ## Start of boilerplate -- do not edit this block #######################
8383export OPENCOARRAYS_SRC_DIR=" ${OPENCOARRAYS_SRC_DIR:- ${PWD%/ } / ../ ../ ..} "
8484if [[ ! -f " ${OPENCOARRAYS_SRC_DIR} /src/libcaf.h" ]]; then
85- echo " Please run this script inside the top-level OpenCoarrays source directory or "
86- echo " set OPENCOARRAYS_SRC_DIR to the OpenCoarrays source directory path."
85+ echo " Please run this script inside the OpenCoarrays source sudirectory src/tests/instsallation "
86+ echo " or set OPENCOARRAYS_SRC_DIR to the OpenCoarrays source directory path."
8787 exit 1
8888fi
8989export B3B_USE_CASE=" ${B3B_USE_CASE:- ${OPENCOARRAYS_SRC_DIR} / prerequisites/ use-case} "
You can’t perform that action at this time.
0 commit comments