diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-04-11 23:42:47 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-04-11 23:42:47 +0100 |
commit | 89fc0b34a2f274db9082aa60b1fc1e1bae889a28 (patch) | |
tree | 79f6b0942af19f568b7ec4d0760cc1d5cecc935a /runtests.py | |
parent | 19a90d06289d7117ba6531cbc532ea5db7b44073 (diff) | |
download | numpy-89fc0b34a2f274db9082aa60b1fc1e1bae889a28.tar.gz |
BUG: runtests --bench fails on windows
Previously, it would send the task into the backround, and resume a shell,
making interactive use impossible.
This is due to https://bugs.python.org/issue9148, and follows on from
gh-8873.
Diffstat (limited to 'runtests.py')
-rwxr-xr-x | runtests.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/runtests.py b/runtests.py index 1f8dc6e64..7a72ca517 100755 --- a/runtests.py +++ b/runtests.py @@ -208,9 +208,8 @@ def main(argv): if not args.bench_compare: cmd = ['asv', 'run', '-n', '-e', '--python=same'] + bench_args - os.chdir(os.path.join(ROOT_DIR, 'benchmarks')) - os.execvp(cmd[0], cmd) - sys.exit(1) + ret = subprocess.call(cmd, cwd=os.path.join(ROOT_DIR, 'benchmarks')) + sys.exit(ret) else: commits = [x.strip() for x in args.bench_compare.split(',')] if len(commits) == 1: @@ -233,21 +232,16 @@ def main(argv): print("*"*80) # Fix commit ids (HEAD is local to current repo) - p = subprocess.Popen(['git', 'rev-parse', commit_b], - stdout=subprocess.PIPE) - out, err = p.communicate() + out = subprocess.check_output(['git', 'rev-parse', commit_b]) commit_b = out.strip() - p = subprocess.Popen(['git', 'rev-parse', commit_a], - stdout=subprocess.PIPE) - out, err = p.communicate() + out = subprocess.check_output(['git', 'rev-parse', commit_a]) commit_a = out.strip() cmd = ['asv', 'continuous', '-e', '-f', '1.05', commit_a, commit_b] + bench_args - os.chdir(os.path.join(ROOT_DIR, 'benchmarks')) - os.execvp(cmd[0], cmd) - sys.exit(1) + ret = subprocess.call(cmd, cwd=os.path.join(ROOT_DIR, 'benchmarks')) + sys.exit(ret) test_dir = os.path.join(ROOT_DIR, 'build', 'test') |