regrtest: add a summary of the summary, "Result: xxx"
It's sometimes hard to check quickly if tests succeeded, failed or something
bad happened. I added a final "Result: xxx" line which summarizes all outputs
into a single line, written at the end (it should always be the last line of
the output).
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 0723c43..78c52bd 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -431,6 +431,14 @@
duration = time.monotonic() - self.start_time
print("Total duration: %s" % format_duration(duration))
+ if self.bad:
+ result = "FAILURE"
+ elif self.interrupted:
+ result = "INTERRUPTED"
+ else:
+ result = "SUCCESS"
+ print("Result: %s" % result)
+
if self.ns.runleaks:
os.system("leaks %d" % os.getpid())