summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <juliantaylor108@gmail.com>2015-09-10 20:12:12 +0200
committerJulian Taylor <juliantaylor108@gmail.com>2015-09-10 20:12:12 +0200
commit3397fced0e7dd012772c76d3694f7f77a05c8449 (patch)
tree743e7e60fd2f60a27387d113b2da17393e67241e
parent4eb2dbc32a6d3528fdb30b86874fc874f499a93d (diff)
parentda54c08b0336222fda128d2652eb867609add101 (diff)
downloadnumpy-3397fced0e7dd012772c76d3694f7f77a05c8449.tar.gz
Merge pull request #6279 from pitrou/parallel_runtests
DEV: allow parallel build in runtests.py
-rwxr-xr-xruntests.py6
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')