mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 23:30:35 -06:00
Merge topic 'ctest-test-changing-labels'
d2515f77e1Merge branch 'master' into ctest-test-changing-labels26170ea306CTest: Reset multi-options to persistent multi-options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6403
This commit is contained in:
@@ -68,10 +68,8 @@ void cmCTestGenericHandler::Initialize()
|
||||
{
|
||||
this->AppendXML = false;
|
||||
this->TestLoad = 0;
|
||||
this->Options.clear();
|
||||
for (auto const& po : this->PersistentOptions) {
|
||||
this->Options[po.first] = po.second;
|
||||
}
|
||||
this->Options = this->PersistentOptions;
|
||||
this->MultiOptions = this->PersistentMultiOptions;
|
||||
}
|
||||
|
||||
const char* cmCTestGenericHandler::GetOption(const std::string& op)
|
||||
|
||||
@@ -194,6 +194,19 @@ add_test(
|
||||
endfunction()
|
||||
run_completion_status()
|
||||
|
||||
# Verify that running ctest_test() multiple times with different label arguments
|
||||
# doesn't break.
|
||||
function(run_changing_labels)
|
||||
set(CASE_CMAKELISTS_SUFFIX_CODE [[
|
||||
add_test(NAME a COMMAND ${CMAKE_COMMAND} -E true)
|
||||
set_property(TEST a PROPERTY LABELS a)
|
||||
add_test(NAME b COMMAND ${CMAKE_COMMAND} -E true)
|
||||
set_property(TEST b PROPERTY LABELS b)
|
||||
]])
|
||||
run_ctest(TestChangingLabels)
|
||||
endfunction()
|
||||
run_changing_labels()
|
||||
|
||||
# Verify that test output can add additional labels
|
||||
function(run_extra_labels)
|
||||
set(CASE_CMAKELISTS_SUFFIX_CODE [[
|
||||
|
||||
@@ -15,4 +15,9 @@ set(ctest_test_args "@CASE_CTEST_TEST_ARGS@")
|
||||
ctest_start(Experimental)
|
||||
ctest_configure()
|
||||
ctest_build()
|
||||
ctest_test(${ctest_test_args})
|
||||
if("@CASE_NAME@" STREQUAL "TestChangingLabels")
|
||||
ctest_test(${ctest_test_args} INCLUDE_LABEL "^a$")
|
||||
ctest_test(${ctest_test_args} INCLUDE_LABEL "^b$")
|
||||
else()
|
||||
ctest_test(${ctest_test_args})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user