mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
ctest: Remove outdated optimization of tests running ctest itself
In commit2c2291bbe0(ENH: add new feature to ctest so that it can cmake, build and run a test executable, 2004-01-07, v2.4.0~3483) ctest was taught to recognize tests that run ctest itself and run them internally instead of spawning a new process. This optimization was removed by commitb9daa192af(ENH: Refactored CTest test execution code into an object, 2009-08-19, v2.8.0~276) `cmCTestRunTest` replaced `cmCTestTestHandler::ProcessOneTest`, which was eventually removed by commit5a5cc52230(Fixed conversion warning on 64 bit machines, 2009-08-31, v2.8.0~241). Since then the optimization was only left in `--build-and-test` mode, likely by accident, where it makes little difference. Remove it to simplify the code. Also drop the `--force-new-ctest-process` option, originally added by commit9255e40d81(ENH: Add a way to force ctest to be a new process, 2004-05-10, v2.4.0~3101), since it no longer does anything.
This commit is contained in:
@@ -29,15 +29,6 @@ const char* cmCTestBuildAndTest::GetOutput()
|
||||
return this->Output.c_str();
|
||||
}
|
||||
|
||||
int cmCTestBuildAndTest::Run()
|
||||
{
|
||||
this->Output.clear();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
int retv = this->RunCMakeAndTest();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
return retv;
|
||||
}
|
||||
|
||||
int cmCTestBuildAndTest::RunCMake(std::ostringstream& out,
|
||||
std::string& cmakeOutString, cmake* cm)
|
||||
{
|
||||
@@ -131,7 +122,7 @@ public:
|
||||
const cmCTestBuildAndTestCaptureRAII&) = delete;
|
||||
};
|
||||
|
||||
int cmCTestBuildAndTest::RunCMakeAndTest()
|
||||
int cmCTestBuildAndTest::Run()
|
||||
{
|
||||
// if the generator and make program are not specified then it is an error
|
||||
if (this->BuildGenerator.empty()) {
|
||||
|
||||
@@ -35,8 +35,6 @@ public:
|
||||
private:
|
||||
cmCTest* CTest;
|
||||
|
||||
//! Run CMake and build a test and then run it as a single test.
|
||||
int RunCMakeAndTest();
|
||||
int RunCMake(std::ostringstream& out, std::string& cmakeOutString,
|
||||
cmake* cm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user