diff options
Diffstat (limited to 'Tests')
35 files changed, 88 insertions, 43 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 273a541..cf7bd75 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2549,7 +2549,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if (CMAKE_TESTS_CDASH_SERVER) - set(regex "^([^:]+)://([^/]+)(/.*)$") + set(regex "^([^:]+)://([^/]+)(.*)$") if ("${CMAKE_TESTS_CDASH_SERVER}" MATCHES "${regex}") set(protocol "${CMAKE_MATCH_1}") @@ -2557,8 +2557,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(path "${CMAKE_MATCH_3}") else () set(protocol "http") - set(server "www.cdash.org") - set(path "/CDash") + set(server "open.cdash.org") + set(path "") message("warning: CMAKE_TESTS_CDASH_SERVER does not match expected regex...") message(" ...using default url='${protocol}://${server}${path}' for CTestTest[23]") endif () diff --git a/Tests/CTestTestBadExe/CTestConfig.cmake b/Tests/CTestTestBadExe/CTestConfig.cmake index 1d46ea3..c7286e2 100644 --- a/Tests/CTestTestBadExe/CTestConfig.cmake +++ b/Tests/CTestTestBadExe/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestBadExe") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestBadGenerator/CTestConfig.cmake b/Tests/CTestTestBadGenerator/CTestConfig.cmake index ef98189..1e61bf4 100644 --- a/Tests/CTestTestBadGenerator/CTestConfig.cmake +++ b/Tests/CTestTestBadGenerator/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestBadGenerator") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake b/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake index d2c28f9..4458348 100644 --- a/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake +++ b/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestConfigFileInBuildDir") set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCostSerial/CTestConfig.cmake b/Tests/CTestTestCostSerial/CTestConfig.cmake index 05c20eb..3ab99ac 100644 --- a/Tests/CTestTestCostSerial/CTestConfig.cmake +++ b/Tests/CTestTestCostSerial/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestCostSerial") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCrash/CTestConfig.cmake b/Tests/CTestTestCrash/CTestConfig.cmake index e1c5b1b..5c2ca0e 100644 --- a/Tests/CTestTestCrash/CTestConfig.cmake +++ b/Tests/CTestTestCrash/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestCrash") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCycle/CTestConfig.cmake b/Tests/CTestTestCycle/CTestConfig.cmake index 43e9986..8aeb09b 100644 --- a/Tests/CTestTestCycle/CTestConfig.cmake +++ b/Tests/CTestTestCycle/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestCycle") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestDepends/CTestConfig.cmake b/Tests/CTestTestDepends/CTestConfig.cmake index e3af7dd..7af9200 100644 --- a/Tests/CTestTestDepends/CTestConfig.cmake +++ b/Tests/CTestTestDepends/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestDepends") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestFailure/CTestConfig.cmake b/Tests/CTestTestFailure/CTestConfig.cmake index fd8d97a..07e1be0 100644 --- a/Tests/CTestTestFailure/CTestConfig.cmake +++ b/Tests/CTestTestFailure/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestFailure") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake index bf404ab..669b0fb 100644 --- a/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake @@ -3,6 +3,6 @@ set(CTEST_PROJECT_NAME "CTestTestLaunchers") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestMemcheck/CTestConfig.cmake.in b/Tests/CTestTestMemcheck/CTestConfig.cmake.in index 6cf3782..19c76c2 100644 --- a/Tests/CTestTestMemcheck/CTestConfig.cmake.in +++ b/Tests/CTestTestMemcheck/CTestConfig.cmake.in @@ -2,8 +2,8 @@ set (CTEST_PROJECT_NAME "CTestTestMemcheck@SUBTEST_NAME@") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) @CTEST_EXTRA_CONFIG@ diff --git a/Tests/CTestTestParallel/CTestConfig.cmake b/Tests/CTestTestParallel/CTestConfig.cmake index c3c5038..fc5b666 100644 --- a/Tests/CTestTestParallel/CTestConfig.cmake +++ b/Tests/CTestTestParallel/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestParallel") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestResourceLock/CTestConfig.cmake b/Tests/CTestTestResourceLock/CTestConfig.cmake index 5fb560b..c118777 100644 --- a/Tests/CTestTestResourceLock/CTestConfig.cmake +++ b/Tests/CTestTestResourceLock/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestResourceLock") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestScheduler/CTestConfig.cmake b/Tests/CTestTestScheduler/CTestConfig.cmake index 7da8f6f..797387b 100644 --- a/Tests/CTestTestScheduler/CTestConfig.cmake +++ b/Tests/CTestTestScheduler/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestScheduler") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake index ad8e00e..da0c76b 100644 --- a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake +++ b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestSkipReturnCode") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestStopTime/CTestConfig.cmake b/Tests/CTestTestStopTime/CTestConfig.cmake index 129db4d..412283e 100644 --- a/Tests/CTestTestStopTime/CTestConfig.cmake +++ b/Tests/CTestTestStopTime/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestStopTime") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestSubdir/CTestConfig.cmake b/Tests/CTestTestSubdir/CTestConfig.cmake index 4b848aa..47ebb92 100644 --- a/Tests/CTestTestSubdir/CTestConfig.cmake +++ b/Tests/CTestTestSubdir/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestSubdir") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestTimeout/CTestConfig.cmake b/Tests/CTestTestTimeout/CTestConfig.cmake index 76d62ad..13114f1 100644 --- a/Tests/CTestTestTimeout/CTestConfig.cmake +++ b/Tests/CTestTestTimeout/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestTimeout") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestUpload/CTestConfig.cmake b/Tests/CTestTestUpload/CTestConfig.cmake index 89c5b94..a547088 100644 --- a/Tests/CTestTestUpload/CTestConfig.cmake +++ b/Tests/CTestTestUpload/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestUpload") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set (CTEST_DROP_METHOD "http") -set (CTEST_DROP_SITE "www.cdash.org") -set (CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set (CTEST_DROP_SITE "open.cdash.org") +set (CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set (CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestZeroTimeout/CTestConfig.cmake b/Tests/CTestTestZeroTimeout/CTestConfig.cmake index f8e0609..6094864 100644 --- a/Tests/CTestTestZeroTimeout/CTestConfig.cmake +++ b/Tests/CTestTestZeroTimeout/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestZeroTimeout") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt index 81b34e6..d4f49c2 100644 --- a/Tests/InterfaceLibrary/CMakeLists.txt +++ b/Tests/InterfaceLibrary/CMakeLists.txt @@ -8,8 +8,18 @@ target_compile_definitions(iface_nodepends INTERFACE IFACE_DEFINE) add_subdirectory(headerdir) +# Add an interface target in a subdirectory that uses an imported interface. +add_subdirectory(ifacedir) + +# Poison an imported interface with the same name as that in the subdir +# to ensure that the transitive lookup occurs in the subdir. +add_library(imp::iface INTERFACE IMPORTED) +set_property(TARGET imp::iface APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOMEPROP OFF) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/does_not_exist.cpp) + add_executable(InterfaceLibrary definetestexe.cpp) -target_link_libraries(InterfaceLibrary iface_nodepends headeriface) +target_link_libraries(InterfaceLibrary iface_nodepends headeriface subiface) add_subdirectory(libsdir) diff --git a/Tests/InterfaceLibrary/definetestexe.cpp b/Tests/InterfaceLibrary/definetestexe.cpp index e7a10c1..30f2925 100644 --- a/Tests/InterfaceLibrary/definetestexe.cpp +++ b/Tests/InterfaceLibrary/definetestexe.cpp @@ -15,7 +15,9 @@ #error Expected IFACE_HEADER_BUILDDIR #endif +extern int sub(); + int main(int,char**) { - return 0; + return sub(); } diff --git a/Tests/InterfaceLibrary/ifacedir/CMakeLists.txt b/Tests/InterfaceLibrary/ifacedir/CMakeLists.txt new file mode 100644 index 0000000..228715e --- /dev/null +++ b/Tests/InterfaceLibrary/ifacedir/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(imp::iface INTERFACE IMPORTED) +set_property(TARGET imp::iface APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOMEPROP ON) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sub.cpp) + +add_library(subiface INTERFACE) +target_link_libraries(subiface INTERFACE imp::iface) +set_property(TARGET subiface PROPERTY INTERFACE_SOMEPROP ON) diff --git a/Tests/InterfaceLibrary/ifacedir/sub.cpp b/Tests/InterfaceLibrary/ifacedir/sub.cpp new file mode 100644 index 0000000..165a66a --- /dev/null +++ b/Tests/InterfaceLibrary/ifacedir/sub.cpp @@ -0,0 +1 @@ +int sub() { return 0; } diff --git a/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt b/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt new file mode 100644 index 0000000..2143ba4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: unknown option '-bad-arg1'$ diff --git a/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt b/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt b/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt new file mode 100644 index 0000000..d2efa53 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: no command given$ diff --git a/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt b/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt b/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt new file mode 100644 index 0000000..d2efa53 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: no command given$ diff --git a/Tests/RunCMake/CommandLine/E_env-set-stdout.txt b/Tests/RunCMake/CommandLine/E_env-set-stdout.txt new file mode 100644 index 0000000..feff117 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-set-stdout.txt @@ -0,0 +1 @@ +^-- TEST_ENV is correctly set in environment: 1$ diff --git a/Tests/RunCMake/CommandLine/E_env-set.cmake b/Tests/RunCMake/CommandLine/E_env-set.cmake new file mode 100644 index 0000000..c2639b6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-set.cmake @@ -0,0 +1,5 @@ +if(DEFINED ENV{TEST_ENV}) + message(STATUS "TEST_ENV is correctly set in environment: $ENV{TEST_ENV}") +else() + message(FATAL_ERROR "TEST_ENV is incorrectly not set in environment") +endif() diff --git a/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt b/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt new file mode 100644 index 0000000..a1d5c01 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt @@ -0,0 +1 @@ +^-- TEST_ENV is correctly not set in environment$ diff --git a/Tests/RunCMake/CommandLine/E_env-unset.cmake b/Tests/RunCMake/CommandLine/E_env-unset.cmake new file mode 100644 index 0000000..04976fb --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-unset.cmake @@ -0,0 +1,5 @@ +if(DEFINED ENV{TEST_ENV}) + message(FATAL_ERROR "TEST_ENV is incorrectly set in environment") +else() + message(STATUS "TEST_ENV is correctly not set in environment") +endif() diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index f3d9637..5622a5b 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -31,6 +31,12 @@ if(UNIX) ) endif() +run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env) +run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1) +run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) +run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) +run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) + run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) |