Skip to content

Commit

Permalink
Only run Test.jl precompilation workload when outputting (JuliaLang#5…
Browse files Browse the repository at this point in the history
…4045)

These types of workloads are usually only run when generating output.
  • Loading branch information
sjkelly authored Apr 12, 2024
1 parent 1ae41a2 commit be3bc9a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions stdlib/Test/src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
redirect_stdout(devnull) do
@testset "example" begin
@test 1 == 1
@test_throws ErrorException error()
@test_logs (:info, "Doing foo with n=2") @info "Doing foo with n=2"
@test_broken 1 == 2
@test 1 1.0000000000000001
if Base.generating_output()
redirect_stdout(devnull) do
@testset "example" begin
@test 1 == 1
@test_throws ErrorException error()
@test_logs (:info, "Doing foo with n=2") @info "Doing foo with n=2"
@test_broken 1 == 2
@test 1 1.0000000000000001
end
end
end

0 comments on commit be3bc9a

Please sign in to comment.