summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-01-05 19:14:10 (GMT)
committerBrad King <brad.king@kitware.com>2009-01-05 19:14:10 (GMT)
commit2703d51b8f382f3d20abe409b116eb0afd5051ff (patch)
treeb3207fe2d42965e0900756eac3a0194ceae4170f /Source/cmCTest.h
parent86aeefc7c97cd65d952513963400d28e6eb32808 (diff)
downloadCMake-2703d51b8f382f3d20abe409b116eb0afd5051ff.zip
CMake-2703d51b8f382f3d20abe409b116eb0afd5051ff.tar.gz
CMake-2703d51b8f382f3d20abe409b116eb0afd5051ff.tar.bz2
BUG: Capture cout and cerr from internal ctest
When CTest detects that a test is running its own executable it optimizes the test by using an internal instance of cmCTest instead of creating a new process. However, the internal instance was using cout and cerr directly. This redirects the output to a string stream to avoid direct display of the internal test's output.
Diffstat (limited to 'Source/cmCTest.h')
-rw-r--r--Source/cmCTest.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index a9bdb62..10a7d5b 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -331,6 +331,10 @@ public:
bool GetVerbose() { return this->Verbose;}
bool GetExtraVerbose() { return this->ExtraVerbose;}
+
+ /** Direct process output to given streams. */
+ void SetStreams(std::ostream* out, std::ostream* err)
+ { this->StreamOut = out; this->StreamErr = err; }
private:
std::string ConfigType;
bool Verbose;
@@ -402,6 +406,10 @@ private:
bool CompressXMLFiles;
+ void InitStreams();
+ std::ostream* StreamOut;
+ std::ostream* StreamErr;
+
void BlockTestErrorDiagnostics();