diff options
author | Brad King <brad.king@kitware.com> | 2012-04-18 15:09:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-04-19 12:32:57 (GMT) |
commit | 38c3943b6fd30cbc684211a1abf73330813dcda1 (patch) | |
tree | 02b900883fc5feb56b83a0e6827976743542ece5 /Tests/RunCMake/CMakeLists.txt | |
parent | 31e7fadbb3bfd225e0d48e2d072ccc745d7f2689 (diff) | |
download | CMake-38c3943b6fd30cbc684211a1abf73330813dcda1.zip CMake-38c3943b6fd30cbc684211a1abf73330813dcda1.tar.gz CMake-38c3943b6fd30cbc684211a1abf73330813dcda1.tar.bz2 |
Teach RunCMake tests to allow custom checks
Look for a <SubTest>-check.cmake script and load it to check side
effects of the sub test. Provide it with the test source and build tree
paths in variables. Check for a failure message in a result variable.
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 0b79efa..488d469 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -24,11 +24,16 @@ # 4.) Create a <SubTest>.cmake file for each sub-test named above # containing the actual test code. Optionally create files # containing expected test results: -# <SubTest>-result.txt = Process result expected if not "0" -# <SubTest>-stdout.txt = Regex matching expected stdout content -# <SubTest>-stderr.txt = Regex matching expected stderr content +# <SubTest>-result.txt = Process result expected if not "0" +# <SubTest>-stdout.txt = Regex matching expected stdout content +# <SubTest>-stderr.txt = Regex matching expected stderr content +# <SubTest>-check.cmake = Custom result check # Note that trailing newlines will be stripped from actual test # output before matching against the stdout and stderr expressions. +# The code in <SubTest>-check.cmake may use variables +# RunCMake_TEST_SOURCE_DIR = Top of test source tree +# RunCMake_TEST_BINARY_DIR = Top of test binary tree +# and an failure must store a message in RunCMake_TEST_FAILED. macro(add_RunCMake_test test) add_test(RunCMake.${test} ${CMAKE_CMAKE_COMMAND} |