Skip to content

Commit b4266e8

Browse files
authored
use a separate depot for --pkgimages loading test (#53344)
Otherwise this will write compile files to your home directory (and you get confused in the debug output next time you run the tests due to old precompile files being there)
1 parent 7053e4c commit b4266e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/loading.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ end
14391439
end
14401440

14411441
@testset "command-line flags" begin
1442-
mktempdir() do dir
1442+
mktempdir() do depot_path mktempdir() do dir
14431443
# generate a Parent.jl and Child.jl package, with Parent depending on Child
14441444
open(joinpath(dir, "Child.jl"), "w") do io
14451445
println(io, """
@@ -1458,6 +1458,7 @@ end
14581458
code = "using $name"
14591459
cmd = addenv(`$(Base.julia_cmd()) -e $code $args`,
14601460
"JULIA_LOAD_PATH" => dir,
1461+
"JULIA_DEPOT_PATH" => depot_path,
14611462
"JULIA_DEBUG" => "loading")
14621463

14631464
out = Pipe()
@@ -1514,7 +1515,7 @@ end
15141515
@test occursin(r"Loading object cache file .+ for Child", log)
15151516
@test occursin(r"Generating object cache file for Parent", log)
15161517
@test occursin(r"Loading object cache file .+ for Parent", log)
1517-
end
1518+
end end
15181519
end
15191520

15201521
@testset "including non-existent file throws proper error #52462" begin

0 commit comments

Comments
 (0)