tap-driver.sh: flush stdout after each test result
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 12 Jun 2019 14:50:30 +0000 (10:50 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 12 Jun 2019 19:50:30 +0000 (15:50 -0400)
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 <mjeanson@efficios.com>
Change-Id: I998b83347ca2445f46c3e195b797ce75b0096adb
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1415
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
config/tap-driver.sh

index 2516e9c3f7053a6c8bfa6c46cd521f27a652e0c0..756d20b704fec133d7c28152179dbc058eb84aa4 100755 (executable)
@@ -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";
This page took 0.024962 seconds and 4 git commands to generate.