[Cmake-commits] CMake branch, next, updated. v3.2.1-1026-g8e743b9

Zach Mullen zach.mullen at kitware.com
Sun Mar 15 13:06:22 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  8e743b99e4c688892ef05271b8dae5adb112f2c2 (commit)
       via  64e22138a7dfb5d23940ffb52b8b83f4b10e2b67 (commit)
       via  607131bf8c806b6227e56089eab9252537bd31d8 (commit)
       via  262656b2d64e605579f1e8cc6ee32edcb64aa1c2 (commit)
       via  07696442124e63f6498109480e4adabf4fd00a8c (commit)
      from  0a9885ab197a880c0841aeb93841e8744466fa94 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e743b99e4c688892ef05271b8dae5adb112f2c2
commit 8e743b99e4c688892ef05271b8dae5adb112f2c2
Merge: 0a9885a 64e2213
Author:     Zach Mullen <zach.mullen at kitware.com>
AuthorDate: Sun Mar 15 13:06:20 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Mar 15 13:06:20 2015 -0400

    Merge topic 'output-ctest-env-vars' into next
    
    64e22138 CTest: Output test-specific env vars in verbose mode (#15446)
    607131bf CMake Nightly Date Stamp
    262656b2 CMake Nightly Date Stamp
    07696442 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64e22138a7dfb5d23940ffb52b8b83f4b10e2b67
commit 64e22138a7dfb5d23940ffb52b8b83f4b10e2b67
Author:     Zach Mullen <zach.mullen at kitware.com>
AuthorDate: Sun Mar 15 13:00:31 2015 -0400
Commit:     Zach Mullen <zach.mullen at kitware.com>
CommitDate: Sun Mar 15 13:04:41 2015 -0400

    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.

diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 03131fd..01a7884 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -536,11 +536,26 @@ void cmCTestRunTest::ComputeArguments()
     }
   this->TestResult.FullCommandLine = testCommand;
 
+  // Print the test command in verbose mode
   cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
              << this->Index << ": "
              << (this->TestHandler->MemCheck?"MemCheck":"Test")
              << " command: " << testCommand
              << std::endl);
+
+  // Print any test-specific env vars in verbose mode
+  if (this->TestProperties->Environment.size())
+    {
+    cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": "
+               << "Environment variables: " << std::endl);
+    }
+  for(std::vector<std::string>::const_iterator e =
+      this->TestProperties->Environment.begin();
+      e != this->TestProperties->Environment.end(); ++e)
+    {
+    cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ":  " << *e
+               << std::endl);
+    }
 }
 
 //----------------------------------------------------------------------
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 703c548..4f1adf3 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2561,6 +2561,16 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
     --output-log "${CMake_BINARY_DIR}/Tests/CTestTestParallel/testOutput.log"
     )
 
+  configure_file("${CMake_SOURCE_DIR}/Tests/CTestTestVerboseOutput/test.cmake.in"
+    "${CMake_BINARY_DIR}/Tests/CTestTestVerboseOutput/test.cmake" @ONLY ESCAPE_QUOTES)
+  add_test(CTestTestVerboseOutput ${CMAKE_CTEST_COMMAND}
+    -S "${CMake_BINARY_DIR}/Tests/CTestTestVerboseOutput/test.cmake" -VV
+    --output-log "${CMake_BINARY_DIR}/Tests/CTestTest2/testOutput.log"
+    )
+  set_property(TEST CTestTestVerboseOutput PROPERTY PASS_REGULAR_EXPRESSION
+    "Environment variables:.*foo=bar.*this=that"
+  )
+
   configure_file(
     "${CMake_SOURCE_DIR}/Tests/CTestTestSkipReturnCode/test.cmake.in"
     "${CMake_BINARY_DIR}/Tests/CTestTestSkipReturnCode/test.cmake"
diff --git a/Tests/CTestTestVerboseOutput/CMakeLists.txt b/Tests/CTestTestVerboseOutput/CMakeLists.txt
new file mode 100644
index 0000000..4cdd29c
--- /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 0000000..4f96c79
--- /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 0000000..f8b643a
--- /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 0000000..7f49548
--- /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- at 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}")

-----------------------------------------------------------------------

Summary of changes:
 Source/CMakeVersion.cmake                               |    2 +-
 Source/CTest/cmCTestRunTest.cxx                         |   15 +++++++++++++++
 Tests/CMakeLists.txt                                    |   10 ++++++++++
 Tests/CTestTestVerboseOutput/CMakeLists.txt             |   11 +++++++++++
 .../CTestConfig.cmake                                   |    2 +-
 .../CTestTestVerboseOutput/nop.c                        |    0
 .../test.cmake.in}                                      |   13 ++++++-------
 7 files changed, 44 insertions(+), 9 deletions(-)
 create mode 100644 Tests/CTestTestVerboseOutput/CMakeLists.txt
 copy Tests/{CTestTestScheduler => CTestTestVerboseOutput}/CTestConfig.cmake (83%)
 copy Modules/DummyCXXFile.cxx => Tests/CTestTestVerboseOutput/nop.c (100%)
 copy Tests/{CTestTestFailure/testNoExe.cmake.in => CTestTestVerboseOutput/test.cmake.in} (72%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list