Return proper exit value if test failed

Return 1 then.

Contributes to issue CURA-5330.
This commit is contained in:
Ghostkeeper 2018-05-04 15:50:05 +02:00
parent ffd1c5cc09
commit 651f2ffbc9
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -46,14 +46,9 @@ def main():
print("------------- Checking module {mod}".format(**locals()))
result = subprocess.run([sys.executable, mypyModule, "-p", mod])
if result.returncode != 0:
print("""
Module {mod} failed checking. :(
""".format(**locals()))
break
print("\nModule {mod} failed checking. :(".format(**locals()))
return 1
else:
print("""
Done checking. All is good.
""")
print("\n\nDone checking. All is good.")
return 0
sys.exit(main())