[Patchew-devel] [PATCH] testing: print "OUTPUT END" after killing the test script
Paolo Bonzini
pbonzini at redhat.com
Sun Jan 13 14:05:48 UTC 2019
Otherwise, there is a small window where OUTPUT END has already been
printed but the script is still running, and the emails (which look
for OUTPUT END) may lose some content.
Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
patchew-cli | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/patchew-cli b/patchew-cli
index 8012955..a66edb9 100755
--- a/patchew-cli
+++ b/patchew-cli
@@ -548,8 +548,6 @@ class TesterCommand(SubCommand):
if rc != None:
break
time.sleep(0.1)
- logf.write("=== OUTPUT END ===\n")
- logf.write("\n")
if rc == None:
try:
tp.terminate()
@@ -560,8 +558,11 @@ class TesterCommand(SubCommand):
tp.wait()
except Exception as e:
traceback.print_exc(file=logf)
- logf.write("Abort: command timeout (>%d seconds)" % timeout)
is_timeout = True
+ logf.write("=== OUTPUT END ===\n")
+ logf.write("\n")
+ if is_timeout:
+ logf.write("Abort: command timeout (>%d seconds)" % timeout)
else:
logf.write("Test command exited with code: %d" % rc)
logf.flush()
--
2.20.1
More information about the Patchew-devel
mailing list