Skip to content

Commit

Permalink
Propagate TMPDIR in Distributed tests (JuliaLang#44799)
Browse files Browse the repository at this point in the history
On our macOS CI systems, `TMPDIR` is set to a special path (not `/tmp`)
and the CI processes are not allowed to write into `/tmp`.  This causes
this `Distributed` test to fail, as it loses the special `TMPDIR`
setting.  This explicitly sets `TMPDIR` to ensure that it propagates
correctly.
  • Loading branch information
staticfloat authored Mar 30, 2022
1 parent 516a404 commit 3f23c45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stdlib/Distributed/test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,9 @@ let julia = `$(Base.julia_cmd()) --startup-file=no`; mktempdir() do tmp
env = Dict(
"JULIA_DEPOT_PATH" => join(depots, pathsep),
"JULIA_LOAD_PATH" => join(load_path, pathsep),
# Explicitly propagate `TMPDIR`, in the event that we're running on a
# CI system where `TMPDIR` is special.
"TMPDIR" => dirname(tmp),
)
setupcode = """
using Distributed, Test
Expand Down Expand Up @@ -1830,6 +1833,7 @@ let julia = `$(Base.julia_cmd()) --startup-file=no`; mktempdir() do tmp
env = Dict(
"JULIA_LOAD_PATH" => LOAD_PATH[1],
"JULIA_DEPOT_PATH" => DEPOT_PATH[1],
"TMPDIR" => ENV["TMPDIR"],
)
addprocs(1; env = env, exeflags = `--project=\$(project)`)
env["JULIA_PROJECT"] = project
Expand Down

0 comments on commit 3f23c45

Please sign in to comment.