Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix or suppress some noisy tests 🏌️‍♂️ #44444

Merged
merged 23 commits into from
Mar 6, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1968011
suppress time prints
IanButterworth Mar 4, 2022
3236051
avoid replacing module Foo warning
IanButterworth Mar 4, 2022
761fc2a
suppress empty info log
IanButterworth Mar 4, 2022
3f9d426
Artifacts: make test artifact downloads quiet
IanButterworth Mar 4, 2022
1040a17
LazyArtifacts: make test install quiet
IanButterworth Mar 4, 2022
f5ad556
REPL: suppress foo echo tests
IanButterworth Mar 4, 2022
375f5e8
Merge branch 'master' into ib/denoise_tests
IanButterworth Mar 4, 2022
22784d5
make GC.enable_logging test capture and test print
IanButterworth Mar 4, 2022
3dc7217
capture tested deprecation warnings
IanButterworth Mar 4, 2022
a437d7f
switch with_logger to test_logs
IanButterworth Mar 4, 2022
4d1090a
tidy up Base.active_project_callbacks earlier to avoid error log
IanButterworth Mar 4, 2022
75c98a2
FileWatching: suppress Pidfile warning logs
IanButterworth Mar 5, 2022
6f03d26
instead of suppressing empty info log, use a debug
IanButterworth Mar 5, 2022
2f21222
convert a noisy boundscheck testset to regular tests
IanButterworth Mar 5, 2022
d45b13f
add missing SecretBuffer shred!s
IanButterworth Mar 5, 2022
33184ce
remove debug-looking print
IanButterworth Mar 5, 2022
51c1346
don't use testsets in tests that are run in parallel
IanButterworth Mar 5, 2022
d090657
LibGit2: don't use testsets in subprocessed tests to prevent print leak
IanButterworth Mar 5, 2022
b4590df
avoid method redefinition in syntax tests
IanButterworth Mar 5, 2022
02c5d1d
redirect stderr around intentional method redefinition to hide warning
IanButterworth Mar 5, 2022
28901b7
add note
IanButterworth Mar 5, 2022
960eae0
🤖 Bump the SHA stdlib from 57c3a8c to 2d1f84e
DilumAluthge Mar 5, 2022
41b38d2
review suggestions
IanButterworth Mar 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stdlib/Artifacts/test/refresh_artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ let
if meta isa Array
for meta in meta
get(meta, "lazy", false) && continue
ensure_artifact_installed(name, meta, toml; platform=unused)
ensure_artifact_installed(name, meta, toml; platform=unused, io = devnull)
end
else; meta::Dict
get(meta, "lazy", false) && continue
ensure_artifact_installed(name, meta, toml; platform=unused)
ensure_artifact_installed(name, meta, toml; platform=unused, io = devnull)
end
end
end
Expand Down
16 changes: 10 additions & 6 deletions stdlib/LazyArtifacts/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ using Test

mktempdir() do tempdir
LazyArtifacts.Artifacts.with_artifacts_directory(tempdir) do
socrates_dir = artifact"socrates"
@test isdir(socrates_dir)
redirect_stderr(devnull) do
socrates_dir = artifact"socrates"
@test isdir(socrates_dir)
end
ex = @test_throws ErrorException artifact"HelloWorldC"
@test startswith(ex.value.msg, "Artifact \"HelloWorldC\" was not installed correctly. ")
end
Expand All @@ -18,10 +20,12 @@ end
using Test
mktempdir() do tempdir
Artifacts.with_artifacts_directory(tempdir) do
socrates_dir = @test_logs(
(:warn, "using Pkg instead of using LazyArtifacts is deprecated"),
artifact"socrates")
@test isdir(socrates_dir)
redirect_stderr(devnull) do
socrates_dir = @test_logs(
(:warn, "using Pkg instead of using LazyArtifacts is deprecated"),
artifact"socrates")
@test isdir(socrates_dir)
end
end
end'`,
dir=@__DIR__)))
2 changes: 2 additions & 0 deletions stdlib/REPL/test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ fake_repl() do stdin_write, stdout_read, repl
@test readuntil(stdout_read, "end", keep=true) == "\n\r\e[7C α=1\n\r\e[7C β=2\n\r\e[7Cend"

# Test switching repl modes
redirect_stdout(devnull) do # to suppress "foo" echoes
sendrepl2("""\e[200~
julia> A = 1
1
Expand All @@ -775,6 +776,7 @@ fake_repl() do stdin_write, stdout_read, repl
wait(c)
@test Main.A == 1
@test Main.B == 2
end # redirect_stdout

# Close repl
write(stdin_write, '\x04')
Expand Down
2 changes: 2 additions & 0 deletions test/backtrace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ let bt, found = false
end

# issue 28618
Base.CoreLogging.with_logger(Base.CoreLogging.NullLogger()) do
let bt, found = false
@info ""
bt = backtrace()
Expand All @@ -193,6 +194,7 @@ let bt, found = false
end
@test found
end
end # with_logger

# Syntax error locations appear in backtraces
let trace = try
Expand Down
6 changes: 3 additions & 3 deletions test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ Base.set_active_project(saved_active_project)
@test watcher_counter[] == 3

# issue #28190
module Foo; import Libdl; end
import .Foo.Libdl; import Libdl
@test Foo.Libdl === Libdl
module Foo28190; import Libdl; end
import .Foo28190.Libdl; import Libdl
@test Foo28190.Libdl === Libdl

@testset "include with mapexpr" begin
let exprs = Any[]
Expand Down
4 changes: 4 additions & 0 deletions test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ v11801, t11801 = @timed sin(1)

@test names(@__MODULE__, all = true) == names_before_timing

redirect_stdout(devnull) do # suppress time prints
# Accepted @time argument formats
@test @time true
@test @time "message" true
Expand Down Expand Up @@ -348,6 +349,9 @@ end

after = Base.cumulative_compile_time_ns_after();
@test after >= before;
wait(t1)
wait(t2)
end # redirect_stdout

# interactive utilities

Expand Down