Added test coverage for cmCTestRunScriptCommand

This commit is contained in:
Zach Mullen 2009-10-26 13:10:46 -04:00
parent f2284b9c3e
commit 6e3dd78b8b
3 changed files with 26 additions and 0 deletions

View File

@ -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)

View File

@ -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")

View File

@ -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")