summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-22 19:09:49 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-22 19:09:49 (GMT)
commit290ab79f61508bac4ce44b15d2b3e661c4c32c32 (patch)
tree80949e3ebf04dc5f2015d030a5ef16b4bcc67a85 /Tests
parentd911f8fc1294105826809d8c3283120d944fa772 (diff)
parent5778880d20a7fb78ee6144b52d93ff371df54a41 (diff)
downloadCMake-290ab79f61508bac4ce44b15d2b3e661c4c32c32.zip
CMake-290ab79f61508bac4ce44b15d2b3e661c4c32c32.tar.gz
CMake-290ab79f61508bac4ce44b15d2b3e661c4c32c32.tar.bz2
Merge branch 'ctest-json-REQUIRED_FILES' into release-3.15
Merge-request: !3719
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py16
2 files changed, 18 insertions, 4 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index d524f41..b7f9a37 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -200,7 +200,11 @@ function(run_ShowOnly)
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
add_test(ShowOnly \"${CMAKE_COMMAND}\" -E echo)
- set_tests_properties(ShowOnly PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\")
+ set_tests_properties(ShowOnly PROPERTIES
+ WILL_FAIL true
+ REQUIRED_FILES RequiredFileDoesNotExist
+ _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\"
+ )
add_test(ShowOnlyNotAvailable NOT_AVAILABLE)
")
run_cmake_command(show-only_human ${CMAKE_CTEST_COMMAND} --show-only=human)
diff --git a/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py
index 4dff90c..3ad5768 100644
--- a/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py
+++ b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py
@@ -63,6 +63,15 @@ def check_command(c):
assert is_string(c[2])
assert c[2] == "echo"
+def check_reqfiles_property(p):
+ assert is_dict(p)
+ assert sorted(p.keys()) == ["name", "value"]
+ assert is_string(p["name"])
+ assert is_list(p["value"])
+ assert p["name"] == "REQUIRED_FILES"
+ assert len(p["value"]) == 1
+ assert p["value"][0] == "RequiredFileDoesNotExist"
+
def check_willfail_property(p):
assert is_dict(p)
assert sorted(p.keys()) == ["name", "value"]
@@ -81,9 +90,10 @@ def check_workingdir_property(p):
def check_properties(p):
assert is_list(p)
- assert len(p) == 2
- check_willfail_property(p[0])
- check_workingdir_property(p[1])
+ assert len(p) == 3
+ check_reqfiles_property(p[0])
+ check_willfail_property(p[1])
+ check_workingdir_property(p[2])
def check_tests(t):
assert is_list(t)