Commit ac339fc2 authored by wbond's avatar wbond

Actually exit with an error result if errors occurred

parent 6186db37
...@@ -61,7 +61,7 @@ test_mod.generate_default_test_methods() ...@@ -61,7 +61,7 @@ test_mod.generate_default_test_methods()
suite = unittest.TestLoader().loadTestsFromModule(test_mod) suite = unittest.TestLoader().loadTestsFromModule(test_mod)
channel_results = unittest.TextTestRunner(stream=sys.stdout, verbosity=0).run(suite) channel_results = unittest.TextTestRunner(stream=sys.stdout, verbosity=0).run(suite)
if not channel_results.wasSuccessful(): if not channel_results.wasSuccessful():
exit(1) exit(2)
print() print()
...@@ -377,6 +377,10 @@ try: ...@@ -377,6 +377,10 @@ try:
else: else:
print('Non-VCS package found in primary channel', file=sys.stderr) print('Non-VCS package found in primary channel', file=sys.stderr)
exit(4) exit(4)
if errors:
exit(5)
finally: finally:
if mod_path and os.path.exists(mod_path): if mod_path and os.path.exists(mod_path):
shutil.rmtree(mod_path) shutil.rmtree(mod_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment