From 68b66a256a54d32992dfefeaad11eea88b7df234 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 12 Jun 2019 10:50:30 -0400 Subject: [PATCH] tap-driver.sh: flush stdout after each test result This is useful in a CI system where stdout is fully buffered and you look at the console output to see which test is hanging. Signed-off-by: Michael Jeanson Change-Id: I998b83347ca2445f46c3e195b797ce75b0096adb Reviewed-on: https://review.lttng.org/c/babeltrace/+/1415 Tested-by: jenkins Reviewed-by: Philippe Proulx --- config/tap-driver.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/tap-driver.sh b/config/tap-driver.sh index 2516e9c3..756d20b7 100755 --- a/config/tap-driver.sh +++ b/config/tap-driver.sh @@ -273,6 +273,9 @@ function report(result, details) msg = msg " " details # Output on console might be colorized. print decorate_result(result) msg + # Flush stdout after each test result, this is useful when stdout + # is buffered, for example in a CI system. + fflush() # Log the result in the log file too, to help debugging (this is # especially true when said result is a TAP error or "Bail out!"). print result msg | "cat >&3"; -- 2.34.1