diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index bebaf1e02..7d3a8bf9e 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -83,9 +83,7 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test) // now remove the test itself this->EraseTest(test); - cmCTestRunTest* testRun = new cmCTestRunTest; - testRun->SetCTest(this->CTest); - testRun->SetTestHandler(this->TestHandler); + cmCTestRunTest* testRun = new cmCTestRunTest(this->TestHandler); testRun->SetIndex(test); testRun->SetTestProperties(this->Properties[test]); if(testRun->StartTest()) @@ -346,9 +344,7 @@ void cmCTestMultiProcessHandler::PrintTestList() count++; cmCTestTestHandler::cmCTestTestProperties& p = *it->second; - cmCTestRunTest testRun; - testRun.SetCTest(this->CTest); - testRun.SetTestHandler(this->TestHandler); + cmCTestRunTest testRun(this->TestHandler); testRun.SetIndex(p.Index); testRun.SetTestProperties(&p); testRun.ComputeArguments(); //logs the command in verbose mode diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 92df585f0..86119a2c5 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -20,8 +20,10 @@ #include "cmCTest.h" #include "cmSystemTools.h" -cmCTestRunTest::cmCTestRunTest() +cmCTestRunTest::cmCTestRunTest(cmCTestTestHandler* handler) { + this->CTest = handler->CTest; + this->TestHandler = handler; } cmCTestRunTest::~cmCTestRunTest() @@ -302,12 +304,6 @@ void cmCTestRunTest::MemCheckPostProcess() } } -void cmCTestRunTest::SetTestHandler(cmCTestTestHandler * handler) -{ - this->TestHandler = handler; - this->CTest = handler->CTest; -} - //---------------------------------------------------------------------- // Starts the execution of a test. Returns once it has started bool cmCTestRunTest::StartTest() diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index d104d7d64..ee888d356 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -29,7 +29,7 @@ class cmCTestRunTest { public: - cmCTestRunTest(); + cmCTestRunTest(cmCTestTestHandler* handler); ~cmCTestRunTest(); void SetTestProperties(cmCTestTestHandler::cmCTestTestProperties * prop) @@ -37,13 +37,9 @@ public: cmCTestTestHandler::cmCTestTestProperties * GetTestProperties() { return this->TestProperties; } - - void SetTestHandler(cmCTestTestHandler * handler); void SetIndex(int i) { this->Index = i; } - void SetCTest(cmCTest * ct) { this->CTest = ct; } - int GetIndex() { return this->Index; } std::string GetProcessOutput() { return this->ProcessOutput; }