Tests output is displayed in batches making it difficult to observe
the progress. This commit introduces flushing the stdout after every
printf to overcome the problem.
Change-Id: I84174a15e7bf797080b4f830fe5adaa3e48f6b26
* @brief Source file containing ConsoleCollector class definition
*/
+#include <cstdio>
+
#include <fstream>
#include <sstream>
void ConsoleCollector::CollectCurrentTestGroupName(const std::string& name)
{
printf("Starting group %s\n", name.c_str());
+ fflush(stdout);
m_currentGroup = name;
}
PrintStats(group.first, group.second);
}
PrintStats("All tests together", m_stats);
+ fflush(stdout);
}
void ConsoleCollector::CollectResult(const std::string& id, const TestResult &result)
default:
Assert(false && "Bad status");
}
+ fflush(stdout);
m_stats.AddTest(result.GetFailStatus());
m_groupsStats[m_currentGroup].AddTest(result.GetFailStatus());
}