diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-10-26 17:10:46 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-10-26 17:10:46 (GMT) |
commit | 6e3dd78b8ba5ebceade06744806e98038aa2569e (patch) | |
tree | f880eb5a2a1156e2f94b0aad35dca76e5f063712 | |
parent | f2284b9c3e425dcd9082eabf2ef58cdf20a837b0 (diff) | |
download | CMake-6e3dd78b8ba5ebceade06744806e98038aa2569e.zip CMake-6e3dd78b8ba5ebceade06744806e98038aa2569e.tar.gz CMake-6e3dd78b8ba5ebceade06744806e98038aa2569e.tar.bz2 |
Added test coverage for cmCTestRunScriptCommand
-rw-r--r-- | Tests/CMakeLists.txt | 13 | ||||
-rw-r--r-- | Tests/CTestTestRunScript/hello.cmake | 6 | ||||
-rw-r--r-- | Tests/CTestTestRunScript/test.cmake | 7 |
3 files changed, 26 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 645ceaa..a4f603b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1185,6 +1185,19 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel SET_TESTS_PROPERTIES(CTestTestTimeout PROPERTIES PASS_REGULAR_EXPRESSION "\\*\\*\\*Timeout") + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestRunScript/test.cmake" + "${CMake_BINARY_DIR}/Tests/CTestTestRunScript/test.cmake" + @ONLY ESCAPE_QUOTES) + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestRunScript/hello.cmake" + "${CMake_BINARY_DIR}/Tests/CTestTestRunScript/hello.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestRunScript ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestRunScript/test.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestRunScript/testOutput.log" + ) + ADD_TEST(CTestTestShowOnly ${CMAKE_CTEST_COMMAND} -N) ADD_TEST(CTestBatchTest ${CMAKE_CTEST_COMMAND} -B) diff --git a/Tests/CTestTestRunScript/hello.cmake b/Tests/CTestTestRunScript/hello.cmake new file mode 100644 index 0000000..e2c652c --- /dev/null +++ b/Tests/CTestTestRunScript/hello.cmake @@ -0,0 +1,6 @@ +GET_FILENAME_COMPONENT(CTEST_COMMAND "${CMAKE_COMMAND}" PATH) +SET(CTEST_COMMAND "${CTEST_COMMAND}/ctest") +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestRunScript") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestRunScript") + +message("hello world") diff --git a/Tests/CTestTestRunScript/test.cmake b/Tests/CTestTestRunScript/test.cmake new file mode 100644 index 0000000..4afcdd9 --- /dev/null +++ b/Tests/CTestTestRunScript/test.cmake @@ -0,0 +1,7 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.1) +GET_FILENAME_COMPONENT(CTEST_COMMAND "${CMAKE_COMMAND}" PATH) +SET(CTEST_COMMAND "${CTEST_COMMAND}/ctest") +SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestRunScript") +SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestRunScript") + +CTEST_RUN_SCRIPT("${CTEST_BINARY_DIRECTORY}/hello.cmake") |