Fixed duplicated output when writing in PRE_ALL report hook with a redirected output

This commit is contained in:
Snaipe 2015-08-20 19:56:23 +02:00
parent ad1338e768
commit b7528a9542
2 changed files with 2 additions and 1 deletions

View file

@ -1,5 +1,4 @@
criterion_init
criterion_init
testing test in category sample
Asserts: [1 passed, 1 failed, 2 total]
criterion_fini

View file

@ -296,6 +296,8 @@ static int criterion_run_all_tests_impl(void) {
report(PRE_ALL, set);
log(pre_all, set);
fflush(NULL); // flush everything before forking
smart struct criterion_global_stats *stats = stats_init();
map_tests(set, stats, run_test);