Skip to content

Commit 10014c5

Browse files
IanButterworthKristofferC
authored andcommitted
Clarify and enhance confusing precompile test (#59170)
(cherry picked from commit 1f6eff1)
1 parent 9e77df2 commit 10014c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/precompile.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,10 @@ precompile_test_harness(false) do dir
687687
error("the \"break me\" test failed")
688688
catch exc
689689
isa(exc, ErrorException) || rethrow()
690-
occursin("ERROR: LoadError: break me", exc.msg) && rethrow()
690+
# The LoadError shouldn't be surfaced but is printed to stderr, hence the `@test_warn` capture tests
691+
occursin("LoadError: break me", exc.msg) && rethrow()
692+
# The actual error that is thrown
693+
occursin("Failed to precompile FooBar2", exc.msg) || rethrow()
691694
end
692695

693696
# Test that trying to eval into closed modules during precompilation is an error

0 commit comments

Comments
 (0)