summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-result.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stderr.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-stdout.txt (renamed from Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-from-file-stdout.txt)0
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-result.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stderr.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt2
-rw-r--r--Tests/RunCMake/CTestCommandLine/TestsFromFile-include-stdout.txt (renamed from Tests/RunCMake/CTestCommandLine/TestsFromFile-tests-from-file-stdout.txt)0
-rw-r--r--Tests/RunCMake/ctest_test/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-result.txt1
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stderr.txt2
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stdout.txt2
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt (renamed from Tests/RunCMake/ctest_test/TestsFromFile-EXCLUDE_FROM_FILE-stdout.txt)0
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-include-missing-result.txt1
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stderr.txt2
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stdout.txt2
-rw-r--r--Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt (renamed from Tests/RunCMake/ctest_test/TestsFromFile-INCLUDE_FROM_FILE-stdout.txt)0
18 files changed, 33 insertions, 9 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index c09fff8..715a5fa 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -208,7 +208,7 @@ endfunction()
run_SkipRegexFoundTest()
-function(run_TestsFromFileTest arg)
+function(run_TestsFromFileTest case)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestsFromFile)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
@@ -219,10 +219,12 @@ add_test(Test1 \"${CMAKE_COMMAND}\" -E echo \"test1\")
add_test(Test2 \"${CMAKE_COMMAND}\" -E echo \"test2\")
add_test(Test11 \"${CMAKE_COMMAND}\" -E echo \"test11\")
")
- run_cmake_command(TestsFromFile-${arg} ${CMAKE_CTEST_COMMAND} --${arg} ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList.txt )
+ run_cmake_command(TestsFromFile-${case} ${CMAKE_CTEST_COMMAND} ${ARGN})
endfunction()
-run_TestsFromFileTest(tests-from-file)
-run_TestsFromFileTest(exclude-from-file)
+run_TestsFromFileTest(include --tests-from-file ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList.txt)
+run_TestsFromFileTest(exclude --exclude-from-file ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList.txt)
+run_TestsFromFileTest(include-missing --tests-from-file ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-missing.txt)
+run_TestsFromFileTest(exclude-missing --exclude-from-file ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-missing.txt)
function(run_SerialFailed)
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-result.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stderr.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stderr.txt
new file mode 100644
index 0000000..1d22abc
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stderr.txt
@@ -0,0 +1,2 @@
+Problem reading test list file: [^
+]*/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList-missing\.txt while generating list of tests to run\.
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt
new file mode 100644
index 0000000..1e4e805
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt
@@ -0,0 +1,2 @@
+Test project [^
+]*/Tests/RunCMake/CTestCommandLine/TestsFromFile$
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-from-file-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-stdout.txt
index 96d8c3b..96d8c3b 100644
--- a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-from-file-stdout.txt
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-stdout.txt
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-result.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stderr.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stderr.txt
new file mode 100644
index 0000000..1d22abc
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stderr.txt
@@ -0,0 +1,2 @@
+Problem reading test list file: [^
+]*/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList-missing\.txt while generating list of tests to run\.
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt
new file mode 100644
index 0000000..1e4e805
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt
@@ -0,0 +1,2 @@
+Test project [^
+]*/Tests/RunCMake/CTestCommandLine/TestsFromFile$
diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-tests-from-file-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-stdout.txt
index 653d56c..653d56c 100644
--- a/Tests/RunCMake/CTestCommandLine/TestsFromFile-tests-from-file-stdout.txt
+++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-stdout.txt
diff --git a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
index 4413a4d..e2c41a0 100644
--- a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
@@ -165,18 +165,20 @@ run_stop_on_failure()
# test include/exclude tests from file
-function(run_tests_from_file mode)
- set(CASE_CTEST_TEST_ARGS ${mode} ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList.txt)
+function(run_tests_from_file case)
+ set(CASE_CTEST_TEST_ARGS ${ARGN})
set(CASE_CMAKELISTS_SUFFIX_CODE [[
add_test(NAME Test1 COMMAND ${CMAKE_COMMAND} -E true)
add_test(NAME Test2 COMMAND ${CMAKE_COMMAND} -E true)
add_test(NAME Test11 COMMAND ${CMAKE_COMMAND} -E true)
]])
- run_ctest(TestsFromFile-${mode})
+ run_ctest(TestsFromFile-${case})
endfunction()
-run_tests_from_file(INCLUDE_FROM_FILE)
-run_tests_from_file(EXCLUDE_FROM_FILE)
+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-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)
# Make sure environment gets logged
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-result.txt b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stderr.txt b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stderr.txt
new file mode 100644
index 0000000..a5b3e46
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stderr.txt
@@ -0,0 +1,2 @@
+Problem reading test list file: [^
+]*/Tests/RunCMake/ctest_test/TestsFromFile-TestList-missing\.txt while generating list of tests to run\.
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stdout.txt b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stdout.txt
new file mode 100644
index 0000000..ac5a727
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-stdout.txt
@@ -0,0 +1,2 @@
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestsFromFile-exclude-missing-build$
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-EXCLUDE_FROM_FILE-stdout.txt b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt
index 29c2b7f..29c2b7f 100644
--- a/Tests/RunCMake/ctest_test/TestsFromFile-EXCLUDE_FROM_FILE-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-exclude-stdout.txt
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-result.txt b/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stderr.txt b/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stderr.txt
new file mode 100644
index 0000000..a5b3e46
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stderr.txt
@@ -0,0 +1,2 @@
+Problem reading test list file: [^
+]*/Tests/RunCMake/ctest_test/TestsFromFile-TestList-missing\.txt while generating list of tests to run\.
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stdout.txt b/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stdout.txt
new file mode 100644
index 0000000..4a9447c
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-stdout.txt
@@ -0,0 +1,2 @@
+Test project [^
+]*/Tests/RunCMake/ctest_test/TestsFromFile-include-missing-build$
diff --git a/Tests/RunCMake/ctest_test/TestsFromFile-INCLUDE_FROM_FILE-stdout.txt b/Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt
index e3ca719..e3ca719 100644
--- a/Tests/RunCMake/ctest_test/TestsFromFile-INCLUDE_FROM_FILE-stdout.txt
+++ b/Tests/RunCMake/ctest_test/TestsFromFile-include-stdout.txt