mirror of
https://github.com/GothenburgBitFactory/taskshell.git
synced 2025-08-18 15:33:12 +02:00
Tests: The run_all script was not correctly using exit code 0 when all tests pass
This commit is contained in:
parent
6cbdf874be
commit
6e8050bd3d
2 changed files with 5 additions and 7 deletions
|
@ -129,5 +129,4 @@ if __name__ == "__main__":
|
|||
print_category(expected)
|
||||
|
||||
# If we encoutered any failures, return non-zero code
|
||||
if sum(errors.values()):
|
||||
sys.exit(1)
|
||||
sys.exit(1 if int(error_int) or int(unexpected_int) else 0)
|
||||
|
|
|
@ -175,6 +175,8 @@ class TestRunner(object):
|
|||
|
||||
def show_report(self):
|
||||
self.tap.flush()
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
|
||||
log.debug("Calling 'problems --summary' for report")
|
||||
return call([os.path.abspath("problems"), "--summary", cmd_args.tapfile])
|
||||
|
@ -198,11 +200,8 @@ def main():
|
|||
runner = TestRunner()
|
||||
runner.start()
|
||||
|
||||
# If we're producing summary report, propagate the return code
|
||||
if not cmd_args.verbose:
|
||||
return runner.show_report()
|
||||
else:
|
||||
return 0
|
||||
# Propagate the return code
|
||||
return runner.show_report()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue