Skip to content

Commit

Permalink
do not hard-code number of jobs to 1 when running ctest
Browse files Browse the repository at this point in the history
This allows running tests in parallel using the --ctest-args option with an
invocation like this:

build.py ... --stages test --ctest-args "--parallel 8" -- .
  • Loading branch information
mattyjams committed Jun 23, 2020
1 parent 819ce49 commit ce0fc54
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,19 +287,15 @@ def RunCMake(context, extraArgs=None, stages=None):
def RunCTest(context, extraArgs=None):
buildDir = context.buildDir
variant = BuildVariant(context)
#TODO we can't currently run tests in parallel, something to revisit.
numJobs = 1

with CurrentWorkingDirectory(buildDir):
Run(context,
'ctest '
'--output-on-failure '
'--timeout 300 '
'-j {numJobs} '
'-C {variant} '
'{extraArgs} '
.format(numJobs=numJobs,
variant=variant,
.format(variant=variant,
extraArgs=(" ".join(extraArgs) if extraArgs else "")))

def RunMakeZipArchive(context):
Expand Down

0 comments on commit ce0fc54

Please sign in to comment.