Skip to content

Commit 3f23c45

Browse files
authored
Propagate TMPDIR in Distributed tests (#44799)
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.
1 parent 516a404 commit 3f23c45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/Distributed/test/distributed_exec.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,6 +1748,9 @@ let julia = `$(Base.julia_cmd()) --startup-file=no`; mktempdir() do tmp
17481748
env = Dict(
17491749
"JULIA_DEPOT_PATH" => join(depots, pathsep),
17501750
"JULIA_LOAD_PATH" => join(load_path, pathsep),
1751+
# Explicitly propagate `TMPDIR`, in the event that we're running on a
1752+
# CI system where `TMPDIR` is special.
1753+
"TMPDIR" => dirname(tmp),
17511754
)
17521755
setupcode = """
17531756
using Distributed, Test
@@ -1830,6 +1833,7 @@ let julia = `$(Base.julia_cmd()) --startup-file=no`; mktempdir() do tmp
18301833
env = Dict(
18311834
"JULIA_LOAD_PATH" => LOAD_PATH[1],
18321835
"JULIA_DEPOT_PATH" => DEPOT_PATH[1],
1836+
"TMPDIR" => ENV["TMPDIR"],
18331837
)
18341838
addprocs(1; env = env, exeflags = `--project=\$(project)`)
18351839
env["JULIA_PROJECT"] = project

0 commit comments

Comments
 (0)