Added option (#define CAPTURE_STDERR)

if set then the DebugTrace calls only for failing tests are shown
This commit is contained in:
Dmitry Panin
2013-11-19 02:41:30 +04:00
parent 6294bb1eed
commit 6c41e5c92c
7 changed files with 63 additions and 2 deletions

View File

@@ -433,6 +433,15 @@ void TestSuiteGame::assertGame()
Log("<span class=\"success\">==Test Succesful !==</span>");
else
Log("<span class=\"error\">==Test Failed !==</span>");
#ifdef CAPTURE_STDERR
if (error)
{
OutputCapturer::debugAndClear();
} else
{
OutputCapturer::clear();
}
#endif
mMutex.unlock();
}
@@ -585,6 +594,9 @@ void TestSuite::ThreadProc(void* inParam)
{
LOG("Entering TestSuite::ThreadProc");
TestSuite* instance = reinterpret_cast<TestSuite*>(inParam);
#ifdef CAPTURE_STDERR
OutputCapturer::debugAndClear();
#endif
if (instance)
{
string filename;