tap-driver.sh: flush stdout after each test result
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 14 Mar 2019 15:35:39 +0000 (11:35 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Mar 2019 15:37:54 +0000 (11:37 -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: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
config/tap-driver.sh

index 4254e2b3df1ba58cab562ca0208e46f4fe789844..12742cae98cce9ba8ca838de4f2feb6bfd0250fb 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.025527 seconds and 4 git commands to generate.