diff options
Diffstat (limited to 'Tests')
17 files changed, 48 insertions, 3 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 715a5fa..a5e8037 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -209,7 +209,7 @@ run_SkipRegexFoundTest() function(run_TestsFromFileTest case) - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestsFromFile) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestsFromFile-${case}) set(RunCMake_TEST_NO_CLEAN 1) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") @@ -223,6 +223,8 @@ add_test(Test11 \"${CMAKE_COMMAND}\" -E echo \"test11\") endfunction() 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-empty --tests-from-file ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-empty.txt) +run_TestsFromFileTest(exclude-empty --exclude-from-file ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList-empty.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) diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList-empty.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList-empty.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList-empty.txt diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList.txt index 91f6504..975a21c 100644 --- a/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList.txt +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-TestList.txt @@ -1,2 +1,5 @@ Test1 + +est + Test11 # Test11 diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-empty-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-empty-stdout.txt new file mode 100644 index 0000000..64a5473 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-empty-stdout.txt @@ -0,0 +1,10 @@ +Test project [^ +]*/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-empty + +Start 1: Test1 +1/3 Test #1: Test1 ............................ Passed +[0-9.]+ sec + +Start 2: Test2 +2/3 Test #2: Test2 ............................ Passed +[0-9.]+ sec + +Start 3: Test11 +3/3 Test #3: Test11 ........................... Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 3 diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt index 1e4e805..2448284 100644 --- a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing-stdout.txt @@ -1,2 +1,2 @@ Test project [^ -]*/Tests/RunCMake/CTestCommandLine/TestsFromFile$ +]*/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-missing$ diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-stdout.txt index 96d8c3b..6db9b50 100644 --- a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-stdout.txt +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-stdout.txt @@ -1,3 +1,5 @@ +Test project [^ +]*/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude +Start 2: Test2 1/2 Test #2: Test2 ............................ Passed +[0-9.]+ sec +Start 3: Test11 diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-empty-stderr.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-empty-stderr.txt new file mode 100644 index 0000000..a7c4b11 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-empty-stderr.txt @@ -0,0 +1 @@ +^No tests were found!!!$ diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt index 1e4e805..1f87a44 100644 --- a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing-stdout.txt @@ -1,2 +1,2 @@ Test project [^ -]*/Tests/RunCMake/CTestCommandLine/TestsFromFile$ +]*/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-missing$ diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-stdout.txt index 653d56c..d07400d 100644 --- a/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-stdout.txt +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-include-stdout.txt @@ -1,3 +1,5 @@ +Test project [^ +]*/Tests/RunCMake/CTestCommandLine/TestsFromFile-include +Start 1: Test1 1/1 Test #1: Test1 ............................ Passed +[0-9.]+ sec + 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 + |