From a116fd413dee6e2b05f71477bd68e1aa062b8f61 Mon Sep 17 00:00:00 2001 From: Kevin Puetz Date: Wed, 9 Mar 2022 08:42:54 -0600 Subject: ctest: print WORKING_DIRECTORY property with -V --- Source/CTest/cmCTestRunTest.cxx | 8 ++++++++ Tests/CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 6cd3b09..2a314ee 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -694,6 +694,14 @@ void cmCTestRunTest::ComputeArguments() << " 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, this->Index << ": " diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 65f72c5..9ac42a6 100644 --- a/Tests/CMakeLists.txt +++ b/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( -- cgit v0.12