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.
This commit is contained in:
parent
fecbc87608
commit
75a7a23746
@ -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()
|
||||
|
@ -1 +0,0 @@
|
||||
ShowAsJson_check_python(1)
|
@ -0,0 +1 @@
|
||||
show_only_json_check_python(1)
|
@ -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)
|
Loading…
Reference in New Issue
Block a user