tap-driver.sh: flush stdout after each test result
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 13 Mar 2019 21:50:55 +0000 (17:50 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 28 Mar 2019 19:52:47 +0000 (15:52 -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>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
config/tap-driver.sh

index 32521614de9dd265fe3002d3aa462e62247499f9..65037ab65f5dfb03d729704d0132217b66091053 100755 (executable)
@@ -275,6 +275,9 @@ function report(result, details)
     msg = msg " " details
   # Output on console might be colorized.
   print decorate_result(result) msg
     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";
   # 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.0253 seconds and 4 git commands to generate.