diff options
author | Brad King <brad.king@kitware.com> | 2019-01-17 15:57:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-17 15:57:51 (GMT) |
commit | 75a7a237465e37215525831f942a3904d20d1380 (patch) | |
tree | f8f3a7a45d80eba57a4a177c020c113648e4c822 | |
parent | fecbc87608f4b1429721292d3414bde9eb9f073f (diff) | |
download | CMake-75a7a237465e37215525831f942a3904d20d1380.zip CMake-75a7a237465e37215525831f942a3904d20d1380.tar.gz CMake-75a7a237465e37215525831f942a3904d20d1380.tar.bz2 |
Tests: Rename RunCMake.CTestCommandLine show-only test cases
The current name was chosen from an earlier design iteration of the
command-line option name. Rename the case to match the final name.
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 16 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py (renamed from Tests/RunCMake/CTestCommandLine/ShowAsJson1-check.py) | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/show_only_json_check.py (renamed from Tests/RunCMake/CTestCommandLine/ShowAsJson_check.py) | 0 |
5 files changed, 12 insertions, 12 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index cae14b1..c8ea3fc 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -174,12 +174,12 @@ function(run_TestStdin) endfunction() run_TestStdin() -function(ShowAsJson_check_python v) +function(show_only_json_check_python v) set(json_file "${RunCMake_TEST_BINARY_DIR}/ctest.json") file(WRITE "${json_file}" "${actual_stdout}") set(actual_stdout "" PARENT_SCOPE) execute_process( - COMMAND ${PYTHON_EXECUTABLE} "${RunCMake_SOURCE_DIR}/ShowAsJson${v}-check.py" "${json_file}" + COMMAND ${PYTHON_EXECUTABLE} "${RunCMake_SOURCE_DIR}/show-only_json-v${v}_check.py" "${json_file}" RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE output @@ -190,15 +190,15 @@ function(ShowAsJson_check_python v) endif() endfunction() -function(run_ShowAsJson) - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ShowAsJson) +function(run_ShowOnly) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ShowOnly) set(RunCMake_TEST_NO_CLEAN 1) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" " - add_test(ShowAsJson \"${CMAKE_COMMAND}\" -E echo) - set_tests_properties(ShowAsJson PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\") + add_test(ShowOnly \"${CMAKE_COMMAND}\" -E echo) + set_tests_properties(ShowOnly PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\") ") - run_cmake_command(ShowAsJsonVersionOne ${CMAKE_CTEST_COMMAND} --show-only=json-v1) + run_cmake_command(show-only_json-v1 ${CMAKE_CTEST_COMMAND} --show-only=json-v1) endfunction() -run_ShowAsJson() +run_ShowOnly() diff --git a/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake b/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake deleted file mode 100644 index f8bcd2c..0000000 --- a/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake +++ /dev/null @@ -1 +0,0 @@ -ShowAsJson_check_python(1) diff --git a/Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake b/Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake new file mode 100644 index 0000000..f9234f8 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake @@ -0,0 +1 @@ +show_only_json_check_python(1) diff --git a/Tests/RunCMake/CTestCommandLine/ShowAsJson1-check.py b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py index d794e7d..4dff90c 100644 --- a/Tests/RunCMake/CTestCommandLine/ShowAsJson1-check.py +++ b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py @@ -1,4 +1,4 @@ -from ShowAsJson_check import * +from show_only_json_check import * def check_kind(k): assert is_string(k) @@ -77,7 +77,7 @@ def check_workingdir_property(p): assert is_string(p["name"]) assert is_string(p["value"]) assert p["name"] == "WORKING_DIRECTORY" - assert p["value"].endswith("Tests/RunCMake/CTestCommandLine/ShowAsJson") + assert p["value"].endswith("Tests/RunCMake/CTestCommandLine/ShowOnly") def check_properties(p): assert is_list(p) @@ -95,7 +95,7 @@ def check_tests(t): assert test["backtrace"] == 1 check_command(test["command"]) assert is_string(test["name"]) - assert test["name"] == "ShowAsJson" + assert test["name"] == "ShowOnly" check_properties(test["properties"]) assert is_dict(ctest_json) diff --git a/Tests/RunCMake/CTestCommandLine/ShowAsJson_check.py b/Tests/RunCMake/CTestCommandLine/show_only_json_check.py index 493c9e5..493c9e5 100644 --- a/Tests/RunCMake/CTestCommandLine/ShowAsJson_check.py +++ b/Tests/RunCMake/CTestCommandLine/show_only_json_check.py |