Skip to content

Commit

Permalink
Run all --sysimage-native-code=no cmdlineargs tests single-threaded (
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Feb 18, 2025
1 parent 0163991 commit d43a5ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1080,13 +1080,18 @@ run(pipeline(devnull, `$(joinpath(Sys.BINDIR, Base.julia_exename())) --lisp`, de
let exename = `$(Base.julia_cmd()) --startup-file=no`
@test readchomp(`$exename --sysimage-native-code=yes -E
"Bool(Base.JLOptions().use_sysimage_native_code)"`) == "true"
@test readchomp(`$exename --sysimage-native-code=no -E
# TODO: Make this safe in the presence of two single-thread threadpools
# see https://github.com/JuliaLang/julia/issues/57198
@test readchomp(`$exename --sysimage-native-code=no -t1,0 -E
"Bool(Base.JLOptions().use_sysimage_native_code)"`) == "false"
end

# backtrace contains line number info (esp. on windows #17179)
for precomp in ("yes", "no")
succ, out, bt = readchomperrors(`$(Base.julia_cmd()) --startup-file=no --sysimage-native-code=$precomp -E 'sqrt(-2)'`)
# TODO: Make this safe in the presence of two single-thread threadpools
# see https://github.com/JuliaLang/julia/issues/57198
threads = precomp == "no" ? `-t1,0` : ``
succ, out, bt = readchomperrors(`$(Base.julia_cmd()) $threads --startup-file=no --sysimage-native-code=$precomp -E 'sqrt(-2)'`)
@test !succ
@test out == ""
@test occursin(r"\.jl:(\d+)", bt)
Expand Down

0 comments on commit d43a5ad

Please sign in to comment.