Skip to contentSkip to conversation

tap-driver.sh: flush stdout after each test result

PATCH Jonathan Rajotte-Julien 2 participants 2 messages Mar 14, 2019 – Mar 29, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jonathan Rajotte-Julien

author Acked-by
#1 lore raw
Quoted 4 lines · Michael Jeanson

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.

Quoted 25 lines
---
 config/tap-driver.sh | 3 +++
 1 file changed, 3 insertions(+)
config/tap-driver.sh +3 -0
index 32521614..65037ab6 100755
@@ -275,6 +275,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";
Signature · 6 lines
2.17.1

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 2 lines
Jonathan Rajotte-Julien
EfficiOS
#2 lore raw
In reply to a message not in the archive

Merged in master, stable-2.11, stable-2.10, and stable-2.9.

Thanks!
Jérémie

Quoted 25 lines · Michael Jeanson

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.

---
 config/tap-driver.sh | 3 +++
 1 file changed, 3 insertions(+)
config/tap-driver.sh +3 -0
index 32521614..65037ab6 100755
@@ -275,6 +275,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";
Signature · 1 line
2.17.1