Skip to content

Commit

Permalink
justfile: use numParallelJobs in test flag (#2762)
Browse files Browse the repository at this point in the history
The numParallelJobs option on the `justfile` is used to control the
total amount of concurrency when running build commands. This PR adds
this number to the test runner command: `+RTS -N$numParallelJobs -RTS`.
This means that `$numParallelJobs` threads will be used by the test
runner.

NB: ``+RTS -N -RTS` means that tests will use the number of threads
equal to the number of CPUs on the machine.
  • Loading branch information
paulcadman authored May 3, 2024
1 parent 4d229eb commit 3c795fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ stackArgs := stackOptFlag + ' ' + stackParallelFlag + ' ' + stackGhcParallelFlag

# flags used in the stack test command
testArgs := "--hide-successes"
rtsFlag := if disableParallel == '' { '+RTS -N -RTS' } else { '' }
rtsFlag := if disableParallel == '' { '+RTS -N' + numParallelJobs + ' -RTS' } else { '' }

# flag used to enable tracing of bash commands
bashDebugArg := if enableDebug == '' { '' } else { 'x' }
Expand Down

0 comments on commit 3c795fe

Please sign in to comment.