From 6cc553adf298e6244fbdb5fe03841c00ddda29ad Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Thu, 25 Jun 2015 14:12:56 -0300 Subject: lib/igt_core: fflush stdout after printing subtest results I often run "sudo ./test 2>&1 | tee output.txt", and when we're succeeding - never printing to stderr - the output gets buffered and is never flushed (because it doesn't point to a terminal), so I never know which test is running. With this fflush, I'm able to know when each test finishes. v2: Add blank line too (Chris) Reviewed-by: Chris Wilson Signed-off-by: Paulo Zanoni --- lib/igt_core.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/igt_core.c') diff --git a/lib/igt_core.c b/lib/igt_core.c index 051bc6a4..735b56db 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -829,6 +829,8 @@ static void exit_subtest(const char *result) elapsed += (now.tv_nsec - subtest_time.tv_nsec) * 1e-9; printf("Subtest %s: %s (%.3fs)\n", in_subtest, result, elapsed); + fflush(stdout); + in_subtest = NULL; siglongjmp(igt_subtest_jmpbuf, 1); } -- cgit v1.2.3