Browse Source

ctest: Restore support for -T Test without dashboard configuration

Since commit 774fcbe49c (CTest: Base command line mode on top of
scripting commands, 2024-10-05, v4.0.0-rc1~653^2) we drive dashboard
client steps through `cmCTestHandlerCommand::ExecuteHandlerCommand`
instead of calling `ProcessHandler` directly.  This requires the
`BuildDirectory` to be known to establish a work directory.

Fixes: #26743
Co-authored-by: Brad King <brad.king@kitware.com>
pull/381/head
Daniel Pfeifer 5 months ago
committed by Brad King
parent
commit
712cb8cb14
  1. 3
      Source/cmCTest.cxx
  2. 1
      Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-result.txt
  3. 2
      Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-stderr.txt
  4. 3
      Tests/RunCMake/CTestCommandLine/EmptyDirTest-ctest-stderr.txt
  5. 4
      Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake

3
Source/cmCTest.cxx

@ -711,6 +711,9 @@ int cmCTest::ProcessSteps()
this->Impl->Verbose = true;
this->Impl->ProduceXML = true;
// Minimal dashboard client script configuration.
this->SetCTestConfiguration("BuildDirectory", this->Impl->BinaryDir);
this->UpdateCTestConfiguration();
this->BlockTestErrorDiagnostics();

1
Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-result.txt

@ -1 +0,0 @@
32

2
Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-stderr.txt

@ -1,3 +1,3 @@
Cannot find file: [^
]*/Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-build/DartConfiguration.tcl
CTEST_BINARY_DIRECTORY not set
Cannot find any coverage files\. Ignoring Coverage request\.$

3
Tests/RunCMake/CTestCommandLine/EmptyDirTest-ctest-stderr.txt

@ -0,0 +1,3 @@
Cannot find file: [^
]*/Tests/RunCMake/CTestCommandLine/EmptyDirTest-ctest-build/DartConfiguration.tcl
No tests were found!!!$

4
Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake

@ -554,6 +554,10 @@ set(ENV{CMAKE_TLS_VERIFY} 0) # Test fallback to env variable.
run_FailDrop(TLSVerify-OFF-env)
unset(ENV{CMAKE_TLS_VERIFY})
run_cmake_command(EmptyDirTest-ctest
${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Test
)
run_cmake_command(EmptyDirCoverage-ctest
${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Coverage
)

Loading…
Cancel
Save