summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_test
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-03-11 14:15:49 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-03-11 14:16:59 (GMT)
commitda334e2db9e9c931e833ed7f38bf6bdb607312d4 (patch)
tree7e28ca036694eb6a4e47b23d37901700c0923488 /Tests/RunCMake/ctest_test
parentd914c76d63e6cdb8f16fd57747933eece6b6e91c (diff)
parent170ec486014958c372df4c38e940d50b2c0dc0af (diff)
downloadCMake-da334e2db9e9c931e833ed7f38bf6bdb607312d4.zip
CMake-da334e2db9e9c931e833ed7f38bf6bdb607312d4.tar.gz
CMake-da334e2db9e9c931e833ed7f38bf6bdb607312d4.tar.bz2
Merge topic 'ctest-tests-from-file' into release-3.29
170ec48601 Help: Improve ctest tests-from-file documentation wording and wrapping 1a4837641e ctest: Remove unnecessary and ambiguous tests-from-file comment syntax d52c66bfb3 ctest: Honor tests-from-file options with empty input 8673264e25 Tests: Make ctest tests-from-file expected output more precise Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9322
Diffstat (limited to 'Tests/RunCMake/ctest_test')
-rw-r--r--Tests/RunCMake/ctest_test/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-TestList-empty.txt0
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-TestList.txt3
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-exclude-empty-stdout.txt12
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt4
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-include-empty-result.txt1
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-include-empty-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt2
8 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
index e2c41a0..768b0be 100644
--- a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
@@ -177,6 +177,8 @@ add_test(NAME Test11 COMMAND ${CMAKE_COMMAND} -E true)
endfunction()
run_tests_from_file(include INCLUDE_FROM_FILE ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList.txt)
run_tests_from_file(exclude EXCLUDE_FROM_FILE ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList.txt)
+run_tests_from_file(include-empty INCLUDE_FROM_FILE ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-empty.txt)
+run_tests_from_file(exclude-empty EXCLUDE_FROM_FILE ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-empty.txt)
run_tests_from_file(include-missing INCLUDE_FROM_FILE ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-missing.txt)
run_tests_from_file(exclude-missing EXCLUDE_FROM_FILE ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-missing.txt)
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-TestList-empty.txt b/Tests/RunCMake/ctest_test/TestsFromFile-TestList-empty.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-TestList-empty.txt
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-TestList.txt b/Tests/RunCMake/ctest_test/TestsFromFile-TestList.txt
index 91f6504..975a21c 100644
--- a/Tests/RunCMake/ctest_test/TestsFromFile-TestList.txt
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-TestList.txt
@@ -1,2 +1,5 @@
Test1
+
+est
+ Test11
# Test11
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-exclude-empty-stdout.txt b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-empty-stdout.txt
new file mode 100644
index 0000000..a0faf57
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-empty-stdout.txt
@@ -0,0 +1,12 @@
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestsFromFile-exclude-empty-build
+ +Start 1: RunCMakeVersion
+1/4 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+ +Start 2: Test1
+2/4 Test #2: Test1 ............................ Passed +[0-9.]+ sec
+ +Start 3: Test2
+3/4 Test #3: Test2 ............................ Passed +[0-9.]+ sec
+ +Start 4: Test11
+4/4 Test #4: Test11 ........................... Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 4
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt
index 29c2b7f..f401861 100644
--- a/Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt
@@ -1,3 +1,7 @@
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestsFromFile-exclude-build
+ +Start 1: RunCMakeVersion
+1/3 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+Start 3: Test2
2/3 Test #3: Test2 ............................ Passed +[0-9.]+ sec
+Start 4: Test11
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-include-empty-result.txt b/Tests/RunCMake/ctest_test/TestsFromFile-include-empty-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-include-empty-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-include-empty-stderr.txt b/Tests/RunCMake/ctest_test/TestsFromFile-include-empty-stderr.txt
new file mode 100644
index 0000000..a7c4b11
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-include-empty-stderr.txt
@@ -0,0 +1 @@
+^No tests were found!!!$
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt b/Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt
index e3ca719..8e7093b 100644
--- a/Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt
@@ -1,3 +1,5 @@
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestsFromFile-include-build
+Start 2: Test1
1/1 Test #2: Test1 ............................ Passed +[0-9.]+ sec
+