Skip to content

Commit e19b601

Browse files
committed
Use LibSSH v1 for the tests
v1 is threadsafe so the SSH tests don't need to be run single-threaded anymore.
1 parent d5a4589 commit e19b601

3 files changed

Lines changed: 4 additions & 14 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ReviseExt = "Revise"
1818
[compat]
1919
Aqua = "0.8"
2020
Distributed = "1"
21-
LibSSH = "0.7"
21+
LibSSH = "1"
2222
LinearAlgebra = "1"
2323
PrecompileTools = "1"
2424
Random = "1"

test/runtests.jl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,8 @@ cmd = `$test_exename $test_exeflags`
1313
# LibSSH.jl currently only works on unixes, and the latest release currently
1414
# doesn't pass CI on MacOS.
1515
if Sys.islinux()
16-
# Run the SSH tests with a single thread because LibSSH.jl is not thread-safe
1716
sshtestfile = joinpath(@__DIR__, "sshmanager.jl")
18-
if Base.VERSION >= v"1.12-"
19-
# The x,y format for threadpools requires Julia 1.9 or above.
20-
# However, Julia didn't begin starting with 1 interactive thread by default until Julia 1.12
21-
# So we don't need to bother with this on Julia 1.11 and earlier
22-
JULIA_NUM_THREADS = "1,0"
23-
else
24-
JULIA_NUM_THREADS = "1"
25-
end
26-
run(addenv(`$cmd $sshtestfile`, "JULIA_NUM_THREADS" => "1"))
17+
run(`$cmd $sshtestfile`)
2718
else
2819
@warn "Skipping the SSH tests because this platform is not supported"
2920
end

test/sshmanager.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
using Test
22
using DistributedNext
3-
import Sockets: getipaddr, listenany
3+
using Sockets: getipaddr, listenany
44

5-
import LibSSH as ssh
6-
import LibSSH.Demo: DemoServer
5+
using LibSSH: LibSSH as ssh, DemoServer
76

87

98
include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl"))

0 commit comments

Comments
 (0)