Skip to content

Commit

Permalink
fixup! Use LibSSH.jl to set up an SSH server for the SSHManager tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWrigley committed Oct 25, 2024
1 parent 175c6dd commit 7d7ddbf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1924,12 +1924,17 @@ let julia = `$(Base.julia_cmd()) --startup-file=no`; mktempdir() do tmp
"""
cmd = setenv(`$(julia) -e $(failcode)`, env)
@test success(cmd)

# Hideous hack to double escape path separators on Windows so that it gets
# interpolated into the string (and then Cmd) correctly.
escaped_pkg_project = Sys.iswindows() ? replace(pkg_project, "\\" => "\\\\") : pkg_project

# Passing env or exeflags to addprocs(...) to override defaults
envcode = """
using DistributedNext
project = mktempdir()
env = Dict(
"JULIA_LOAD_PATH" => string(LOAD_PATH[1], $(repr(pathsep)), "@stdlib", $(repr(pathsep)), "$(pkg_project)"),
"JULIA_LOAD_PATH" => string(LOAD_PATH[1], $(repr(pathsep)), "@stdlib", $(repr(pathsep)), "$(escaped_pkg_project)"),
"JULIA_DEPOT_PATH" => DEPOT_PATH[1],
"TMPDIR" => ENV["TMPDIR"],
)
Expand All @@ -1939,7 +1944,7 @@ let julia = `$(Base.julia_cmd()) --startup-file=no`; mktempdir() do tmp
""" * funcscode * """
for w in workers()
@test remotecall_fetch(depot_path, w) == [DEPOT_PATH[1]]
@test remotecall_fetch(load_path, w) == [LOAD_PATH[1], "@stdlib", "$(pkg_project)"]
@test remotecall_fetch(load_path, w) == [LOAD_PATH[1], "@stdlib", "$(escaped_pkg_project)"]
@test remotecall_fetch(active_project, w) == project
@test remotecall_fetch(Base.active_project, w) == joinpath(project, "Project.toml")
end
Expand Down

0 comments on commit 7d7ddbf

Please sign in to comment.