Skip to content

Commit 2c9e051

Browse files
authored
Base.runtests: set a temporary Pkg depot path (#42358)
1 parent eb1d6b3 commit 2c9e051

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

base/util.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ function runtests(tests = ["all"]; ncores::Int = ceil(Int, Sys.CPU_THREADS::Int
566566
seed !== nothing && push!(tests, "--seed=0x$(string(seed % UInt128, base=16))") # cast to UInt128 to avoid a minus sign
567567
ENV2 = copy(ENV)
568568
ENV2["JULIA_CPU_THREADS"] = "$ncores"
569+
ENV2["JULIA_DEPOT_PATH"] = mktempdir(; cleanup = true)
569570
try
570571
run(setenv(`$(julia_cmd()) $(joinpath(Sys.BINDIR::String,
571572
Base.DATAROOTDIR, "julia", "test", "runtests.jl")) $tests`, ENV2))

test/cmdlineargs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no`
119119
# handling of @projectname in --project and JULIA_PROJECT
120120
let expanded = abspath(Base.load_path_expand("@foo"))
121121
@test expanded == readchomp(`$exename --project='@foo' -e 'println(Base.active_project())'`)
122-
@test expanded == readchomp(setenv(`$exename -e 'println(Base.active_project())'`, "JULIA_PROJECT" => "@foo", "HOME" => homedir()))
122+
@test expanded == readchomp(addenv(`$exename -e 'println(Base.active_project())'`, "JULIA_PROJECT" => "@foo", "HOME" => homedir()))
123123
end
124124

125125
# --quiet, --banner

0 commit comments

Comments
 (0)