Skip to content

Commit

Permalink
[ new ] Respect NUM_THREADS environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
buzden committed Feb 22, 2023
1 parent d007c28 commit e1c056e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Test/Golden/RunnerHelper.idr
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ DefaultRunScriptArg = MkRunScriptArg "idris2"

nproc : IO $ Maybe Nat
nproc = do
rawThreads <- getEnv "NUM_THREADS"
let Nothing = rawThreads >>= parsePositive
| Just n => pure $ Just n
(str, 0) <- run "nproc"
| _ => pure Nothing
pure $ parsePositive str
Expand Down

0 comments on commit e1c056e

Please sign in to comment.