summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-30 13:55:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-03-30 13:55:42 (GMT)
commite6a5799fa0a74afe958ba9cfed95bdb873a33357 (patch)
treeef4e84d46f6c3635e241f288bf2b3fc2ae49d820 /Tests
parent8a25f817d9bf15ebaad56ecbf376f6735a941485 (diff)
parent44ad3f0b7f7e0aaf96e5cfd672d07a70e1b76410 (diff)
downloadCMake-e6a5799fa0a74afe958ba9cfed95bdb873a33357.zip
CMake-e6a5799fa0a74afe958ba9cfed95bdb873a33357.tar.gz
CMake-e6a5799fa0a74afe958ba9cfed95bdb873a33357.tar.bz2
Merge topic 'multiple-L-labels'
44ad3f0b7f ctest: Support multiple -L and -LE options to mean "AND" Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Lars Bilke <larsbilke83@googlemail.com> Merge-request: !5329
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeTests/CMakeLists.txt1
-rw-r--r--Tests/CTestTestLabelRegExp/test.cmake.in4
-rw-r--r--Tests/QtAutogen/TestMacros.cmake1
-rw-r--r--Tests/QtAutogen/Tests.cmake2
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
5 files changed, 12 insertions, 0 deletions
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index 6bbbe7d..52959e6 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -7,6 +7,7 @@ macro(AddCMakeTest TestName PreArgs)
add_test(NAME CMake.${TestName}
COMMAND ${CMAKE_EXECUTABLE} ${PreArgs}
-P "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" ${ARGN})
+ set_tests_properties("CMake.${TestName}" PROPERTIES LABELS "CMake;command")
endmacro()
diff --git a/Tests/CTestTestLabelRegExp/test.cmake.in b/Tests/CTestTestLabelRegExp/test.cmake.in
index 5c0c9d7..dd40c3b 100644
--- a/Tests/CTestTestLabelRegExp/test.cmake.in
+++ b/Tests/CTestTestLabelRegExp/test.cmake.in
@@ -27,11 +27,15 @@ expect_test_list("test1.*test3.*Total Tests: 2" --label-regex foo)
expect_test_list("test2.*test3.*Total Tests: 2" --label-regex bar)
expect_test_list("test1.*test2.*test3.*Total Tests: 3" --label-regex foo|bar)
expect_test_list("Total Tests: 0" --label-regex baz)
+expect_test_list("Total Tests: 0" --label-regex foo --label-regex baz)
+expect_test_list("test3.*Total Tests: 1" --label-regex foo --label-regex bar)
expect_test_list("test2.*Total Tests: 1" --label-exclude foo)
expect_test_list("test1.*Total Tests: 1" --label-exclude bar)
expect_test_list("Total Tests: 0" --label-exclude foo|bar)
expect_test_list("test1.*test2.*test3.*Total Tests: 3" --label-exclude baz)
+expect_test_list("test1.*test2.*Total Tests: 2" --label-exclude foo --label-exclude bar)
+expect_test_list("test1.*test2.*test3.*Total Tests: 3" --label-exclude foo --label-exclude baz)
expect_test_list("test1.*Total Tests: 1" --label-regex foo --label-exclude bar)
expect_test_list("test2.*Total Tests: 1" --label-regex bar --label-exclude foo)
diff --git a/Tests/QtAutogen/TestMacros.cmake b/Tests/QtAutogen/TestMacros.cmake
index 1024996..9dcf31f 100644
--- a/Tests/QtAutogen/TestMacros.cmake
+++ b/Tests/QtAutogen/TestMacros.cmake
@@ -43,6 +43,7 @@ macro(ADD_AUTOGEN_TEST NAME)
--build-options ${build_options} ${Autogen_BUILD_OPTIONS}
${_TestCommand}
)
+ set_tests_properties("${_QtXAutogen}.${NAME}" PROPERTIES LABELS "Qt${QT_TEST_VERSION}")
list(APPEND TEST_BUILD_DIRS "${_BuildDir}")
unset(_TestCommand)
unset(_QtXAutogen)
diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake
index d1edd72..ab5686a 100644
--- a/Tests/QtAutogen/Tests.cmake
+++ b/Tests/QtAutogen/Tests.cmake
@@ -36,7 +36,9 @@ ADD_AUTOGEN_TEST(UnityMocSource)
if(QT_TEST_ALLOW_QT_MACROS)
ADD_AUTOGEN_TEST(MocCMP0071)
+ set_property(TEST "Qt${QT_TEST_VERSION}Autogen.MocCMP0071" APPEND PROPERTY LABELS "policy")
ADD_AUTOGEN_TEST(MocCMP0100)
+ set_property(TEST "Qt${QT_TEST_VERSION}Autogen.MocCMP0100" APPEND PROPERTY LABELS "policy")
ADD_AUTOGEN_TEST(MocInclude)
ADD_AUTOGEN_TEST(MocIncludeSymlink)
ADD_AUTOGEN_TEST(MocSkipSource)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 07a75b8..f198a4c 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -29,6 +29,10 @@ macro(add_RunCMake_test test)
${TEST_ARGS}
-P "${CMAKE_CURRENT_SOURCE_DIR}/${Test_Dir}/RunCMakeTest.cmake"
)
+ set_tests_properties("RunCMake.${test}" PROPERTIES LABELS "CMake;run")
+ if(${test} MATCHES ^CMP)
+ set_property(TEST "RunCMake.${test}" APPEND PROPERTY LABELS "policy")
+ endif()
endmacro()
function(add_RunCMake_test_group test types)