Skip to content

Commit ca7d19e

Browse files
committed
Make the Distributed detection tests handle precompilation logs
1 parent ddcc376 commit ca7d19e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/distributed_stdlib_detection.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@
55
return String(take!(stderr_buf))
66
end
77

8+
warning_msg = "DistributedNext has detected that the Distributed stdlib may be in use"
9+
810
# Just loading Distributed should do nothing
911
cmd = `$test_exename $test_exeflags -e 'using Distributed, DistributedNext; @assert !DistributedNext._check_distributed_active()'`
10-
@test isempty(get_stderr(cmd))
12+
@test !contains(get_stderr(cmd), warning_msg)
1113

1214
# Only one of the two being active should also do nothing
1315
cmd = `$test_exename $test_exeflags -e 'using Distributed, DistributedNext; Distributed.init_multi(); @assert !DistributedNext._check_distributed_active()'`
14-
@test isempty(get_stderr(cmd))
16+
@test !contains(get_stderr(cmd), warning_msg)
1517

1618
cmd = `$test_exename $test_exeflags -e 'using Distributed, DistributedNext; DistributedNext.init_multi(); @assert !DistributedNext._check_distributed_active()'`
17-
@test isempty(get_stderr(cmd))
19+
@test !contains(get_stderr(cmd), warning_msg)
1820

1921
# But both being active at the same time should trigger a warning
2022
cmd = `$test_exename $test_exeflags -e 'using Distributed, DistributedNext; Distributed.init_multi(); DistributedNext.init_multi(); @assert DistributedNext._check_distributed_active()'`
21-
@test contains(get_stderr(cmd), "DistributedNext has detected that the Distributed stdlib may be in use")
23+
@test contains(get_stderr(cmd), warning_msg)
2224
end

0 commit comments

Comments
 (0)