diff options
author | Antoine Pitrou <antoine@python.org> | 2015-09-02 12:31:52 +0200 |
---|---|---|
committer | Antoine Pitrou <antoine@python.org> | 2015-09-02 12:31:52 +0200 |
commit | da54c08b0336222fda128d2652eb867609add101 (patch) | |
tree | dda06159a14f07820f8ff57de249841341dde111 | |
parent | 1bd6c31548f7557a5e9a0a5886bcedc975487d3b (diff) | |
download | numpy-da54c08b0336222fda128d2652eb867609add101.tar.gz |
DEV: allow parallel build in runtests.py
Add a '-j' / '--parallel' option to runtests.py, to run the compilation step
using multiple processes. This could later be enhanced to allow parallel
testing.
-rwxr-xr-x | runtests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtests.py b/runtests.py index d7ee0c3cd..9376ae55f 100755 --- a/runtests.py +++ b/runtests.py @@ -99,6 +99,8 @@ def main(argv): help="Start Unix shell with PYTHONPATH set") parser.add_argument("--debug", "-g", action="store_true", help="Debug build") + parser.add_argument("--parallel", "-j", type=int, default=0, + help="Number of parallel jobs during build") parser.add_argument("--show-build-log", action="store_true", help="Show build output rather than using a log file") parser.add_argument("--bench", action="store_true", @@ -337,8 +339,10 @@ def build_project(args): env['F90'] = 'gfortran --coverage ' env['LDSHARED'] = cvars['LDSHARED'] + ' --coverage' env['LDFLAGS'] = " ".join(cvars['LDSHARED'].split()[1:]) + ' --coverage' - cmd += ["build"] + cmd += ["build"] + if args.parallel > 1: + cmd += ["-j", str(args.parallel)] cmd += ['install', '--prefix=' + dst_dir] log_filename = os.path.join(ROOT_DIR, 'build.log') |