mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Tests: Move ctest --print-labels case into RunCMake.CTestCommandLine
This commit is contained in:
@@ -3078,11 +3078,6 @@ if(BUILD_TESTING)
|
||||
--output-on-failure -C "\${CTestTest_CONFIG}")
|
||||
endif()
|
||||
|
||||
add_test(CTestTestPrintLabels ${CMAKE_CTEST_COMMAND} --print-labels)
|
||||
set_tests_properties(CTestTestPrintLabels PROPERTIES LABELS "Label1;Label2")
|
||||
set_tests_properties(CTestTestPrintLabels PROPERTIES PASS_REGULAR_EXPRESSION
|
||||
"All Labels:.* Label1.* Label2")
|
||||
|
||||
configure_file(
|
||||
"${CMake_SOURCE_DIR}/Tests/CTestTestLabelRegExp/test.cmake.in"
|
||||
"${CMake_BINARY_DIR}/Tests/CTestTestLabelRegExp/test.cmake"
|
||||
|
||||
6
Tests/RunCMake/CTestCommandLine/PrintLabels-stdout.txt
Normal file
6
Tests/RunCMake/CTestCommandLine/PrintLabels-stdout.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^Test project [^
|
||||
]*/Tests/RunCMake/CTestCommandLine/PrintLabels
|
||||
All Labels:
|
||||
Label1
|
||||
Label2
|
||||
Label3$
|
||||
@@ -23,6 +23,20 @@ set_tests_properties(Long_Test_Name_That_Is_Over_Fifty_Characters_In_Length PROP
|
||||
run_cmake_command(FailureLabels ${CMAKE_CTEST_COMMAND})
|
||||
endblock()
|
||||
|
||||
block()
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/PrintLabels)
|
||||
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(A \"${CMAKE_COMMAND}\" -E true)
|
||||
set_tests_properties(A PROPERTIES LABELS \"Label1;Label2\")
|
||||
add_test(B \"${CMAKE_COMMAND}\" -E true)
|
||||
set_tests_properties(B PROPERTIES LABELS \"Label3\")
|
||||
")
|
||||
run_cmake_command(PrintLabels ${CMAKE_CTEST_COMMAND} --print-labels)
|
||||
endblock()
|
||||
|
||||
run_cmake_command(repeat-opt-bad1
|
||||
${CMAKE_CTEST_COMMAND} --repeat until-pass
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user