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).
This commit is contained in:
Victor Stinner 2016-08-17 16:12:16 +02:00
parent c5a01f8551
commit 636860354e
2 changed files with 25 additions and 4 deletions

View file

@ -431,6 +431,14 @@ class Regrtest:
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())