summaryrefslogtreecommitdiff
path: root/Tests/CTestTestSkipReturnCode
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-09-21 17:37:08 +0200
committerRolf Eike Beer <kde@opensource.sf-tec.de>2014-01-14 23:57:40 +0100
commit3a0d164bb2fa03966cdd7a17c0ce63b4d54f05b7 (patch)
tree859a1201b9ef9d4919b5ef86ff837ecfc1f5c587 /Tests/CTestTestSkipReturnCode
parent31e1c39c57d61c208443973b38a4eb6f7f7d187f (diff)
downloadcmake-3a0d164bb2fa03966cdd7a17c0ce63b4d54f05b7.tar.gz
allow to mark a test as "Not Run" with a specific return code (#8466)
Diffstat (limited to 'Tests/CTestTestSkipReturnCode')
-rw-r--r--Tests/CTestTestSkipReturnCode/CMakeLists.txt8
-rw-r--r--Tests/CTestTestSkipReturnCode/CTestConfig.cmake7
-rw-r--r--Tests/CTestTestSkipReturnCode/test.cmake.in22
3 files changed, 37 insertions, 0 deletions
diff --git a/Tests/CTestTestSkipReturnCode/CMakeLists.txt b/Tests/CTestTestSkipReturnCode/CMakeLists.txt
new file mode 100644
index 0000000000..26c4178fd9
--- /dev/null
+++ b/Tests/CTestTestSkipReturnCode/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 2.8.12)
+project(CTestTestSkipReturnCode)
+include(CTest)
+
+add_test (NAME CMakeV1 COMMAND ${CMAKE_COMMAND} "--version")
+add_test (NAME CMakeV2 COMMAND ${CMAKE_COMMAND} "--version")
+
+set_tests_properties(CMakeV2 PROPERTIES SKIP_RETURN_CODE 0)
diff --git a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake
new file mode 100644
index 0000000000..ad8e00e846
--- /dev/null
+++ b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake
@@ -0,0 +1,7 @@
+set (CTEST_PROJECT_NAME "CTestTestSkipReturnCode")
+set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
+set (CTEST_DART_SERVER_VERSION "2")
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "www.cdash.org")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
+set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/Tests/CTestTestSkipReturnCode/test.cmake.in b/Tests/CTestTestSkipReturnCode/test.cmake.in
new file mode 100644
index 0000000000..ebee01b1ec
--- /dev/null
+++ b/Tests/CTestTestSkipReturnCode/test.cmake.in
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 2.4)
+
+# Settings:
+set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
+set(CTEST_SITE "@SITE@")
+set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-SkipReturnCode")
+
+set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestSkipReturnCode")
+set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSkipReturnCode")
+set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
+set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
+set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@")
+set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
+set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
+set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
+
+#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
+
+CTEST_START(Experimental)
+CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)