Skip to content

Commit acd51cf

Browse files
committed
Adjust tests
1 parent 3fa1bcb commit acd51cf

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

test/cmdlineargs.jl

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -726,19 +726,6 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no`
726726
end
727727
end
728728

729-
let exename = `$(Base.julia_cmd(; cpu_target="native;native")) --startup-file=no --color=no`
730-
# --pkgimages with multiple cpu targets
731-
@testset let v = readchomperrors(`$exename --pkgimages=no`)
732-
@test !v[1]
733-
@test isempty(v[2])
734-
@test v[3] == "ERROR: More than one command line CPU targets specified without a `--output-` flag specified"
735-
end
736-
737-
@test readchomp(`$exename --pkgimages=yes -e '
738-
println("cpu_target = $(unsafe_string(Base.JLOptions().cpu_target)) and use_pkgimages = $(Base.JLOptions().use_pkgimages)")'`) ==
739-
"cpu_target = native;native and use_pkgimages = 1"
740-
end
741-
742729
# Object file with multiple cpu targets
743730
@testset "Object file for multiple microarchitectures" begin
744731
julia_path = joinpath(Sys.BINDIR, Base.julia_exename())
@@ -761,6 +748,14 @@ end
761748
@test !contains(v[3], "More than one command line CPU targets specified")
762749
@test v[3] == "ERROR: File \"boot.jl\" not found"
763750
end
751+
752+
# This is to test that with `pkgimages=yes`, multiple CPU targets are parsed.
753+
# We intentionally fail fast due to a lack of an `--output-o` flag.
754+
let v = readchomperrors(`$julia_path --cpu-target='native;native' --pkgimages=yes`)
755+
@test v[1] == false
756+
@test v[2] == ""
757+
@test contains(v[3], "More than one command line CPU targets specified")
758+
end
764759
end
765760

766761
# Find the path of libjulia (or libjulia-debug, as the case may be)

0 commit comments

Comments
 (0)