summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestLaunchers/launcher_custom_command_test_project
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2017-01-10 18:48:59 (GMT)
committerMatthew Woehlke <matthew.woehlke@kitware.com>2017-01-10 18:48:59 (GMT)
commit4b0c13a87ffb799334669f77978cc4d5e83f950a (patch)
tree365265b321dbdd62cefe6e4772e8473d7a6e77c8 /Tests/CTestTestLaunchers/launcher_custom_command_test_project
parent4918cd8c98938ab245d7fea74ba6e20f3ec8ef8b (diff)
downloadCMake-4b0c13a87ffb799334669f77978cc4d5e83f950a.zip
CMake-4b0c13a87ffb799334669f77978cc4d5e83f950a.tar.gz
CMake-4b0c13a87ffb799334669f77978cc4d5e83f950a.tar.bz2
Tests: Add additional launcher tests
Modify the launcher test to also try to build two executables, having respectively build and link errors. This is intended to test that launchers are used when running compile and link commands, as well as custom commands. (In particular, this should catch breakage such as that fixed by ce71bd9505a.)
Diffstat (limited to 'Tests/CTestTestLaunchers/launcher_custom_command_test_project')
-rw-r--r--Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt19
-rw-r--r--Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake8
-rw-r--r--Tests/CTestTestLaunchers/launcher_custom_command_test_project/command.cmake5
3 files changed, 32 insertions, 0 deletions
diff --git a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt
new file mode 100644
index 0000000..b31f587
--- /dev/null
+++ b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt
@@ -0,0 +1,19 @@
+cmake_minimum_required(VERSION 2.8.12)
+
+project(launcher_custom_command_test_project)
+
+include(CTest)
+
+add_custom_command(
+ OUTPUT test1.txt
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -DTESTID=1 -P "${CMAKE_CURRENT_SOURCE_DIR}/command.cmake"
+)
+
+add_custom_command(
+ OUTPUT test2.txt
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -DTESTID=2 -P "${CMAKE_CURRENT_SOURCE_DIR}/command.cmake"
+)
+
+add_custom_target(mytarget ALL DEPENDS test1.txt test2.txt)
diff --git a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake
new file mode 100644
index 0000000..669b0fb
--- /dev/null
+++ b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake
@@ -0,0 +1,8 @@
+set(CTEST_USE_LAUNCHERS 1)
+set(CTEST_PROJECT_NAME "CTestTestLaunchers")
+set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
+set(CTEST_DART_SERVER_VERSION "2")
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "open.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard")
+set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/command.cmake b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/command.cmake
new file mode 100644
index 0000000..7f31af9
--- /dev/null
+++ b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/command.cmake
@@ -0,0 +1,5 @@
+if("${TESTID}" STREQUAL "1")
+ message("success")
+elseif("${TESTID}" STREQUAL "2")
+ message(FATAL_ERROR "failure")
+endif()