Skip to content

Commit

Permalink
Fixed duplicated output when writing in PRE_ALL report hook with a re…
Browse files Browse the repository at this point in the history
…directed output
  • Loading branch information
Snaipe committed Aug 20, 2015
1 parent ad1338e commit b7528a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion samples/report.out.expected
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
criterion_init
criterion_init
testing test in category sample
Asserts: [1 passed, 1 failed, 2 total]
criterion_fini
2 changes: 2 additions & 0 deletions src/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b7528a9

Please sign in to comment.