diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2015-03-15 13:00:31 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-03-17 10:11:33 -0400 |
commit | 874fdd914a646d25096c34b97caafe43e2a77748 (patch) | |
tree | 977f364db95e1200a4607777282a9d04511579a6 /Tests/CTestTestVerboseOutput | |
parent | 607131bf8c806b6227e56089eab9252537bd31d8 (diff) | |
download | cmake-874fdd914a646d25096c34b97caafe43e2a77748.tar.gz |
CTest: Output test-specific env vars in verbose mode (#15446)
Any environment vars that were configured for a test via the
ENVIRONMENT property will now be output when the test is run
with verbose logging enabled.
Diffstat (limited to 'Tests/CTestTestVerboseOutput')
-rw-r--r-- | Tests/CTestTestVerboseOutput/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/CTestTestVerboseOutput/CTestConfig.cmake | 7 | ||||
-rw-r--r-- | Tests/CTestTestVerboseOutput/nop.c | 4 | ||||
-rw-r--r-- | Tests/CTestTestVerboseOutput/test.cmake.in | 20 |
4 files changed, 42 insertions, 0 deletions
diff --git a/Tests/CTestTestVerboseOutput/CMakeLists.txt b/Tests/CTestTestVerboseOutput/CMakeLists.txt new file mode 100644 index 0000000000..4cdd29c689 --- /dev/null +++ b/Tests/CTestTestVerboseOutput/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required (VERSION 2.6) +project(CTestTestVerboseOutput) +include(CTest) + +add_executable(nop nop.c) + +add_test(NAME TestWithProperties COMMAND nop) +set_property(TEST TestWithProperties PROPERTY ENVIRONMENT + "foo=bar" + "this=that" +) diff --git a/Tests/CTestTestVerboseOutput/CTestConfig.cmake b/Tests/CTestTestVerboseOutput/CTestConfig.cmake new file mode 100644 index 0000000000..4f96c79a9e --- /dev/null +++ b/Tests/CTestTestVerboseOutput/CTestConfig.cmake @@ -0,0 +1,7 @@ +set(CTEST_PROJECT_NAME "CTestTestVerboseOutput") +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/CTestTestVerboseOutput/nop.c b/Tests/CTestTestVerboseOutput/nop.c new file mode 100644 index 0000000000..f8b643afbf --- /dev/null +++ b/Tests/CTestTestVerboseOutput/nop.c @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Tests/CTestTestVerboseOutput/test.cmake.in b/Tests/CTestTestVerboseOutput/test.cmake.in new file mode 100644 index 0000000000..7f49548419 --- /dev/null +++ b/Tests/CTestTestVerboseOutput/test.cmake.in @@ -0,0 +1,20 @@ +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@-VerboseOutput") + +set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestVerboseOutput") +set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestVerboseOutput") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_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_START(Experimental) +CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}") +CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}") +CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}") |