Skip to content

Commit 03b53d3

Browse files
IanButterworthKristofferC
authored andcommitted
Clarify and enhance confusing precompile test (#59170)
(cherry picked from commit 1f6eff1)
1 parent ed63f5a commit 03b53d3

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
@@ -590,7 +590,10 @@ precompile_test_harness(false) do dir
590590
error("the \"break me\" test failed")
591591
catch exc
592592
isa(exc, ErrorException) || rethrow()
593-
occursin("ERROR: LoadError: break me", exc.msg) && rethrow()
593+
# The LoadError shouldn't be surfaced but is printed to stderr, hence the `@test_warn` capture tests
594+
occursin("LoadError: break me", exc.msg) && rethrow()
595+
# The actual error that is thrown
596+
occursin("Failed to precompile FooBar2", exc.msg) || rethrow()
594597
end
595598

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

0 commit comments

Comments
 (0)