Skip to content

Commit a450eec

Browse files
Update runtests.jl
1 parent 1887203 commit a450eec

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

test/runtests.jl

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,15 @@ length(EXTRA_PKGS) ≥ 1 && Pkg.add(EXTRA_PKGS)
2121
const RETESTITEMS_NWORKERS = if GROUP == "wrappers"
2222
0 # Sequential execution for wrapper tests
2323
else
24-
parse(
25-
Int, get(ENV, "RETESTITEMS_NWORKERS",
26-
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
27-
)
28-
)
24+
tmp = get(ENV, "RETESTITEMS_NWORKERS", "")
25+
isempty(tmp) && (tmp = string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4)))
26+
parse(Int, tmp)
27+
end
28+
const RETESTITEMS_NWORKER_THREADS = begin
29+
tmp = get(ENV, "RETESTITEMS_NWORKER_THREADS", "")
30+
isempty(tmp) && (tmp = string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1)))
31+
parse(Int, tmp)
2932
end
30-
const RETESTITEMS_NWORKER_THREADS = parse(Int,
31-
get(
32-
ENV, "RETESTITEMS_NWORKER_THREADS",
33-
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
34-
)
35-
)
3633

3734
@info "Running tests for group: $(GROUP) with $(RETESTITEMS_NWORKERS) workers"
3835

0 commit comments

Comments
 (0)