diff options
author | friendlyanon <friendlyanon_@hotmail.com> | 2022-12-30 14:11:17 (GMT) |
---|---|---|
committer | friendlyanon <friendlyanon_@hotmail.com> | 2023-01-13 12:33:39 (GMT) |
commit | 0661de58d845f537d070979f9b49dd05800a141e (patch) | |
tree | 84c9440a94d8755584c32c18b57cf51e5430d391 /Tests/RunCMake/CTestCommandLine | |
parent | bb52a1781a6eb29bce3c4847b9fc882dd198467a (diff) | |
download | CMake-0661de58d845f537d070979f9b49dd05800a141e.zip CMake-0661de58d845f537d070979f9b49dd05800a141e.tar.gz CMake-0661de58d845f537d070979f9b49dd05800a141e.tar.bz2 |
ctest(1): Add CTEST_NO_TESTS_ACTION env var
This environment variable provides a default value for the
--no-tests=<action> command line argument.
Diffstat (limited to 'Tests/RunCMake/CTestCommandLine')
8 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 8c35fe5..bda260a 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -389,6 +389,14 @@ function(run_NoTests) run_cmake_command(no-tests_error ${CMAKE_CTEST_COMMAND} --no-tests=error) run_cmake_command(no-tests_bad ${CMAKE_CTEST_COMMAND} --no-tests=bad) run_cmake_command(no-tests_legacy ${CMAKE_CTEST_COMMAND}) + + run_cmake_command(no-tests_env_ignore ${CMAKE_COMMAND} -E env CTEST_NO_TESTS_ACTION=ignore ${CMAKE_CTEST_COMMAND}) + run_cmake_command(no-tests_env_error ${CMAKE_COMMAND} -E env CTEST_NO_TESTS_ACTION=error ${CMAKE_CTEST_COMMAND}) + run_cmake_command(no-tests_env_bad ${CMAKE_COMMAND} -E env CTEST_NO_TESTS_ACTION=bad ${CMAKE_CTEST_COMMAND}) + run_cmake_command(no-tests_env_empty_legacy ${CMAKE_COMMAND} -E env CTEST_NO_TESTS_ACTION= ${CMAKE_CTEST_COMMAND}) + + run_cmake_command(no-tests_env_bad_with_cli_error ${CMAKE_COMMAND} -E env CTEST_NO_TESTS_ACTION=bad ${CMAKE_CTEST_COMMAND} --no-tests=error) + file(WRITE "${RunCMake_TEST_BINARY_DIR}/NoTestsScript.cmake" " set(CTEST_COMMAND \"${CMAKE_CTEST_COMMAND}\") set(CTEST_SOURCE_DIRECTORY \"${RunCMake_SOURCE_DIR}\") diff --git a/Tests/RunCMake/CTestCommandLine/no-tests_env_bad-result.txt b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CTestCommandLine/no-tests_env_bad-stderr.txt b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad-stderr.txt new file mode 100644 index 0000000..97187e6 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad-stderr.txt @@ -0,0 +1 @@ +^Unknown value for CTEST_NO_TESTS_ACTION: 'bad'$ diff --git a/Tests/RunCMake/CTestCommandLine/no-tests_env_bad_with_cli_error-result.txt b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad_with_cli_error-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad_with_cli_error-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/CTestCommandLine/no-tests_env_bad_with_cli_error-stderr.txt b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad_with_cli_error-stderr.txt new file mode 100644 index 0000000..eafba1c --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/no-tests_env_bad_with_cli_error-stderr.txt @@ -0,0 +1 @@ +No tests were found!!! diff --git a/Tests/RunCMake/CTestCommandLine/no-tests_env_empty_legacy-stderr.txt b/Tests/RunCMake/CTestCommandLine/no-tests_env_empty_legacy-stderr.txt new file mode 100644 index 0000000..a7c4b11 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/no-tests_env_empty_legacy-stderr.txt @@ -0,0 +1 @@ +^No tests were found!!!$ diff --git a/Tests/RunCMake/CTestCommandLine/no-tests_env_error-result.txt b/Tests/RunCMake/CTestCommandLine/no-tests_env_error-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/no-tests_env_error-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/CTestCommandLine/no-tests_env_error-stderr.txt b/Tests/RunCMake/CTestCommandLine/no-tests_env_error-stderr.txt new file mode 100644 index 0000000..eafba1c --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/no-tests_env_error-stderr.txt @@ -0,0 +1 @@ +No tests were found!!! |