Sfoglia il codice sorgente

ctest: print WORKING_DIRECTORY property with -V

Kevin Puetz 3 anni fa
parent
commit
a116fd413d
2 ha cambiato i file con 9 aggiunte e 1 eliminazioni
  1. 8 0
      Source/CTest/cmCTestRunTest.cxx
  2. 1 1
      Tests/CMakeLists.txt

+ 8 - 0
Source/CTest/cmCTestRunTest.cxx

@@ -693,6 +693,14 @@ void cmCTestRunTest::ComputeArguments()
                << (this->TestHandler->MemCheck ? "MemCheck" : "Test")
                << " command: " << testCommand << std::endl);
 
+  // Print any test-specific env vars in verbose mode
+  if (!this->TestProperties->Directory.empty()) {
+    cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+               this->Index << ": "
+                           << "Working Directory: "
+                           << this->TestProperties->Directory << std::endl);
+  }
+
   // Print any test-specific env vars in verbose mode
   if (!this->TestProperties->Environment.empty()) {
     cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,

+ 1 - 1
Tests/CMakeLists.txt

@@ -2999,7 +2999,7 @@ if(BUILD_TESTING)
     -C "\${CTestTest_CONFIG}"
     )
   set_property(TEST CTestTestVerboseOutput PROPERTY PASS_REGULAR_EXPRESSION
-    "Environment variables:.*foo=bar.*this=that"
+    "Test command:.*Working Directory:.*Environment variables:.*foo=bar.*this=that"
   )
 
   configure_file(