summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake
diff options
context:
space:
mode:
authorGabor Bencze <b.gabor98@gmail.com>2019-07-18 14:58:14 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-07-18 15:52:10 (GMT)
commitd7955d4e5d3038930f333bf12e15a09c7ae6088c (patch)
treed1db54fa5f24c4798b29da105a69baaaa66eb6e2 /Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake
parent4f1dec86a53b789d164827eb6e89696f9e59f1c0 (diff)
downloadCMake-d7955d4e5d3038930f333bf12e15a09c7ae6088c.zip
CMake-d7955d4e5d3038930f333bf12e15a09c7ae6088c.tar.gz
CMake-d7955d4e5d3038930f333bf12e15a09c7ae6088c.tar.bz2
Tests: Create test for SKIP_REGULAR_EXPRESSION test property
Diffstat (limited to 'Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake')
-rw-r--r--Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake b/Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake
new file mode 100644
index 0000000..1a2dfa3
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake
@@ -0,0 +1,13 @@
+set(last_test_log "${RunCMake_TEST_BINARY_DIR}/Testing/Temporary/LastTest.log")
+if(EXISTS "${last_test_log}")
+ file(READ "${last_test_log}" last_test_log_content)
+ string(REGEX REPLACE "\n+$" "" last_test_log_content "${last_test_log_content}")
+ if(NOT last_test_log_content MATCHES "
+Test Pass Reason:
+Skip regular expression found in output. Regex=[[]test1]")
+ string(REPLACE "\n" "\n " last_test_log_content " ${last_test_log_content}")
+ set(RunCMake_TEST_FAILED "LastTest.log does not have expected content:\n${last_test_log_content}")
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "LastTest.log missing:\n ${last_test_log}")
+endif()