Skip to content

Commit

Permalink
Use test project for subprocesses
Browse files Browse the repository at this point in the history
  • Loading branch information
c42f committed Jul 31, 2024
1 parent 82f369d commit d9f26aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,12 @@ if !use_ssh
end
@info use_ssh ? "Running tests with SSH tunnel" : "Testing without SSH tunnel - localhost only"

test_project = Base.active_project()

let
# Use non-default port to avoid clashes with concurrent interactive use or testing.
test_port = RemoteREPL.find_free_port(Sockets.localhost)
server_proc = run(`$(Base.julia_cmd()) --project -e "using RemoteREPL, Sockets, UUIDs ; serve_repl($test_port)"`, wait=false)
server_proc = run(`$(Base.julia_cmd()) --project=$test_project -e "using RemoteREPL, Sockets, UUIDs ; serve_repl($test_port)"`, wait=false)
conn = nothing

try
Expand Down Expand Up @@ -306,7 +308,7 @@ end

let
test_port = RemoteREPL.find_free_port(Sockets.localhost)
server_proc = run(```$(Base.julia_cmd()) --project -e "using RemoteREPL, Sockets, UUIDs ; module EvalInMod ; end;
server_proc = run(```$(Base.julia_cmd()) --project=$test_project -e "using RemoteREPL, Sockets, UUIDs ; module EvalInMod ; end;
serve_repl($test_port, on_client_connect=sess->sess.in_module=EvalInMod)"```, wait=false)
conn = nothing
conn2 = nothing
Expand Down

0 comments on commit d9f26aa

Please sign in to comment.