From 670d27da64bba1fc284db8567c187c12a3e281dd Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Mon, 18 Mar 2019 22:25:50 +0100 Subject: cmCTest: Remove friend declarations --- Source/CTest/cmCTestRunTest.cxx | 9 ++++++--- Source/cmCTest.cxx | 5 +++++ Source/cmCTest.h | 5 ++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 3bf2087..31976b9 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -132,14 +132,17 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) } else { this->TestResult.Status = cmCTestTestHandler::FAILED; outputStream << "***Failed " << reason; - outputTestErrorsToConsole = this->CTest->OutputTestOutputOnTestFailure; + outputTestErrorsToConsole = + this->CTest->GetOutputTestOutputOnTestFailure(); } } else if (res == cmProcess::State::Expired) { outputStream << "***Timeout "; this->TestResult.Status = cmCTestTestHandler::TIMEOUT; - outputTestErrorsToConsole = this->CTest->OutputTestOutputOnTestFailure; + outputTestErrorsToConsole = + this->CTest->GetOutputTestOutputOnTestFailure(); } else if (res == cmProcess::State::Exception) { - outputTestErrorsToConsole = this->CTest->OutputTestOutputOnTestFailure; + outputTestErrorsToConsole = + this->CTest->GetOutputTestOutputOnTestFailure(); outputStream << "***Exception: "; this->TestResult.ExceptionStatus = this->TestProcess->GetExitExceptionString(); diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2cfc852..34999ed 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2825,6 +2825,11 @@ bool cmCTest::GetSubprojectSummary() const return this->SubprojectSummary; } +bool cmCTest::GetOutputTestOutputOnTestFailure() const +{ + return this->OutputTestOutputOnTestFailure; +} + const std::map& cmCTest::GetDefinitions() const { return this->Definitions; diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 14dc283..1d57d57 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -31,9 +31,6 @@ class cmXMLWriter; */ class cmCTest { - friend class cmCTestRunTest; - friend class cmCTestMultiProcessHandler; - public: typedef cmProcessOutput::Encoding Encoding; /** Enumerate parts of the testing and submission process. */ @@ -455,6 +452,8 @@ public: std::string GetCostDataFile(); + bool GetOutputTestOutputOnTestFailure() const; + const std::map& GetDefinitions() const; /** Return the number of times a test should be run */ -- cgit v0.12