Skip to content

Commit cd92195

Browse files
authored
Fix tests when JULIA_DEPOT_PATH is set (#154)
When JULIA_DEPOT_PATH is set, the stdlib depots might not be in DEPOT_PATH. However, because the test does not inherit the env var and instead sets it to something custom, the child processes will get the default. To make sure the tests work properly, just reach into base and query the right values.
1 parent 661112e commit cd92195

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/distributed_exec.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,8 @@ let julia = `$(Base.julia_cmd()) --startup-file=no`; mktempdir() do tmp
18561856
project = mkdir(joinpath(tmp, "project"))
18571857
depots = [mkdir(joinpath(tmp, "depot1")), mkdir(joinpath(tmp, "depot2"))]
18581858
load_path = [mkdir(joinpath(tmp, "load_path")), "@stdlib", "@"]
1859-
shipped_depots = DEPOT_PATH[2:end] # stdlib caches
1859+
shipped_depots = String[] # stdlib caches
1860+
Base.append_bundled_depot_path!(shipped_depots)
18601861

18611862
env = Dict(
18621863
# needs a trailing pathsep to access the stdlib depot

0 commit comments

Comments
 (0)