-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
move out Test from the sysimage #49134
Conversation
8b8d847
to
d862639
Compare
stdlib/Test/src/precompile.jl
Outdated
precompile(Tuple{typeof(Test.filter_errors), Test.DefaultTestSet}) | ||
# TODO: Check which of the explicit precompile statments above are still needed | ||
# with the workload below active. | ||
@testset "example" begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prints to stderr which is not so pretty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can stderr be redirected or would that ruin the precompilation effectiveness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also for some reason this is getting printed again again in the tests when it should only happen during pkgimage precompilation once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They all print from the same worker so maybe there is some test running a bunch of processes with --compiled-modules=no
that loads Test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also printed twice when compiling Julia:
JULIA stdlib/DelimitedFiles.release.image
JULIA stdlib/LibSSH2_jll.release.image
JULIA stdlib/SharedArrays.release.image
JULIA stdlib/Profile.release.image
Test Summary: | Pass Total Time
example | 1 1 0.1s
JULIA stdlib/Test.release.image
JULIA stdlib/SparseArrays.release.image
Test Summary: | Pass Total Time
example | 1 1 0.1s
Seems it should only be once (when it is compiled)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, one with bounds and one without. So two total
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It comes from:
Lines 1089 to 1105 in bd1a664
for (P, D, C, I, O) in Iterators.product(0:1, 0:2, 0:2, 0:1, 0:3) | |
julia = joinpath(Sys.BINDIR, Base.julia_exename()) | |
script = """ | |
using Test | |
let | |
cf = Base.CacheFlags() | |
opts = Base.JLOptions() | |
@test cf.use_pkgimages == opts.use_pkgimages == $P | |
@test cf.debug_level == opts.debug_level == $D | |
@test cf.check_bounds == opts.check_bounds == $C | |
@test cf.inline == opts.can_inline == $I | |
@test cf.opt_level == opts.opt_level == $O | |
end | |
""" | |
cmd = `$julia $(pkgimage(P)) $(opt_level(O)) $(debug_level(D)) $(check_bounds(C)) $(inline(I)) -e $script` | |
@test success(pipeline(cmd; stdout, stderr)) | |
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps all these precompiles should be guarded to happen during precompilation only like SnoopCompile ones are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the usage of Test completely from this test.
I wonder how the precompile tests that fail are relying on that Test is in the sysimage. |
d862639
to
3280b10
Compare
d17071e
to
5e36a3b
Compare
a546197
to
7090399
Compare
7090399
to
e054c66
Compare
There doesn't seem to be any noticeable latency from this. Using a test file:
With this PR I get:
and on 1.9: