Skip to content

Commit

Permalink
Add debug info if repeated precompilation is hit in tests (#3565)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Aug 2, 2023
1 parent 5337b8c commit 2c04d5a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,17 @@ end
Pkg.precompile(io=iob)
@test occursin("Precompiling", String(take!(iob)))
Pkg.precompile(io=iob) # should be a no-op
@test !occursin("Precompiling", String(take!(iob)))
if !occursin("Precompiling", String(take!(iob)))
@test true
else
# helpful for debugging why on CI
println("Repeated precompilation detected. Running again with loading debugging on")
withenv("JULIA_DEBUG" => "loading") do
Pkg.precompile(io=iob)
println(String(take!(iob)))
@test false
end
end
end end
end
end
Expand Down

0 comments on commit 2c04d5a

Please sign in to comment.