Skip to content

Commit b6aa60f

Browse files
authored
Add julia level test for large sysimages
1 parent ad51914 commit b6aa60f

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

test/compileall.jl

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
# We make it a separate test target here, so that it can run in parallel
33
# with the rest of the tests.
44

5-
mktempdir() do dir
6-
@test success(pipeline(`$(Base.julia_cmd()) --compile=all --strip-ir --output-o $(dir)/sys.o.a -e 'exit()'`, stderr=stderr)) skip=(Sys.WORD_SIZE == 32)
7-
if isfile(joinpath(dir, "sys.o.a"))
8-
Base.Linking.link_image(joinpath(dir, "sys.o.a"), joinpath(dir, "sys.so"))
9-
@test success(`$(Base.julia_cmd()) -J $(dir)/sys.so -e 'Base.scrub_repl_backtrace(nothing); exit()'`)
5+
6+
7+
if !Sys.iswindows() #Windows doesn't support large images
8+
mktempdir() do dir
9+
@test success(pipeline(`$(Base.julia_cmd()) --compile=all --strip-ir --output-o $(dir)/sys.o.a -e 'const ballast = Memory{UInt8}(undef, 1 << 31); exit()'`, stderr=stderr)) skip=(Sys.WORD_SIZE == 32)
10+
if isfile(joinpath(dir, "sys.o.a"))
11+
Base.Linking.link_image(joinpath(dir, "sys.o.a"), joinpath(dir, "sys.so"))
12+
@test success(`$(Base.julia_cmd()) -J $(dir)/sys.so -e 'Base.scrub_repl_backtrace(nothing); exit()'`)
13+
end
14+
end
15+
else
16+
mktempdir() do dir
17+
@test success(pipeline(`$(Base.julia_cmd()) --compile=all --strip-ir --output-o $(dir)/sys.o.a -e 'exit()'`, stderr=stderr)) skip=(Sys.WORD_SIZE == 32)
18+
if isfile(joinpath(dir, "sys.o.a"))
19+
Base.Linking.link_image(joinpath(dir, "sys.o.a"), joinpath(dir, "sys.so"))
20+
@test success(`$(Base.julia_cmd()) -J $(dir)/sys.so -e 'Base.scrub_repl_backtrace(nothing); exit()'`)
21+
end
1022
end
1123
end

0 commit comments

Comments
 (0)