Skip to content

Commit

Permalink
run-tests.py has to return the correct error codes
Browse files Browse the repository at this point in the history
`os.system(cmd)` does not return the correct error codes as expected.
now replaced by `subprocess.call(cmd)` which does.
  • Loading branch information
skuschel committed Feb 10, 2015
1 parent 00b37f3 commit 467ee55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# THIS FILE MUST RUN WITHOUT ERROR ON EVERY COMMIT!

import os
import subprocess


def exitonfailure(exitstatus, cmd=None):
Expand All @@ -49,7 +50,7 @@ def main():
for cmd in cmds:
print('===== running next command =====')
print(cmd)
exitonfailure(os.system(cmd), cmd=cmd)
exitonfailure(subprocess.call(cmd, shell=True), cmd=cmd)


if __name__ == '__main__':
Expand Down

0 comments on commit 467ee55

Please sign in to comment.