diff options
| -rwxr-xr-x | run_tests | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -27,14 +27,13 @@ import sys | |||
| 27 | def run_pytest(cmd, argv): | 27 | def run_pytest(cmd, argv): |
| 28 | """Run the unittests via |cmd|.""" | 28 | """Run the unittests via |cmd|.""" |
| 29 | try: | 29 | try: |
| 30 | subprocess.check_call([cmd] + argv) | 30 | return subprocess.call([cmd] + argv) |
| 31 | return 0 | ||
| 32 | except OSError as e: | 31 | except OSError as e: |
| 33 | if e.errno == errno.ENOENT: | 32 | if e.errno == errno.ENOENT: |
| 34 | print('%s: unable to run `%s`: %s' % (__file__, cmd, e), file=sys.stderr) | 33 | print('%s: unable to run `%s`: %s' % (__file__, cmd, e), file=sys.stderr) |
| 35 | print('%s: Try installing pytest: sudo apt-get install python-pytest' % | 34 | print('%s: Try installing pytest: sudo apt-get install python-pytest' % |
| 36 | (__file__,), file=sys.stderr) | 35 | (__file__,), file=sys.stderr) |
| 37 | return 1 | 36 | return 127 |
| 38 | else: | 37 | else: |
| 39 | raise | 38 | raise |
| 40 | 39 | ||
