Skip to content

Commit d60503a

Browse files
musmStefanKarpinski
authored andcommitted
Disable startup files in misc. tests that spawn julia_cmd (#31421)
1 parent 9686d88 commit d60503a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

stdlib/Sockets/test/runtests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ end
446446
srv = listen(addr)
447447
s = connect(addr)
448448

449-
@test success(pipeline(`$(Base.julia_cmd()) -e "exit()" -i`, stdin=s))
449+
@test success(pipeline(`$(Base.julia_cmd()) --startup-file=no -e "exit()" -i`, stdin=s))
450450

451451
close(s)
452452
close(srv)

test/loading.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,9 @@ end
571571
cd("foo")
572572
@test Base.active_project() == old
573573
"""
574-
@test success(`$(Base.julia_cmd()) --project=foo -e $(script)`)
574+
@test success(`$(Base.julia_cmd()) --startup-file=no --project=foo -e $(script)`)
575575
withenv("JULIA_PROJECT" => "foo") do
576-
@test success(`$(Base.julia_cmd()) -e $(script)`)
576+
@test success(`$(Base.julia_cmd()) --startup-file=no -e $(script)`)
577577
end
578578
end; end
579579
end
@@ -589,7 +589,7 @@ mktempdir() do dir
589589
mkpath(vpath)
590590
withenv("JULIA_DEPOT_PATH" => dir) do
591591
script = "@assert startswith(Base.active_project(), $(repr(vpath)))"
592-
@test success(`$(Base.julia_cmd()) -e $(script)`)
592+
@test success(`$(Base.julia_cmd()) --startup-file=no -e $(script)`)
593593
end
594594
end
595595

@@ -606,7 +606,7 @@ end
606606
for (env, result) in pairs(cases)
607607
withenv("JULIA_LOAD_PATH" => env) do
608608
script = "LOAD_PATH == $(repr(result)) || error()"
609-
@test success(`$(Base.julia_cmd()) -e $script`)
609+
@test success(`$(Base.julia_cmd()) --startup-file=no -e $script`)
610610
end
611611
end
612612
end
@@ -625,7 +625,7 @@ end
625625
for (env, result) in pairs(cases)
626626
withenv("JULIA_DEPOT_PATH" => env) do
627627
script = "DEPOT_PATH == $(repr(result)) || error()"
628-
@test success(`$(Base.julia_cmd()) -e $script`)
628+
@test success(`$(Base.julia_cmd()) --startup-file=no -e $script`)
629629
end
630630
end
631631
end

test/spawn.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ end
519519

520520
# Logging macros should not output to finalized streams (#26687)
521521
let
522-
cmd = `$(Base.julia_cmd()) -e 'finalizer(x->@info(x), "Hello")'`
522+
cmd = `$exename --startup-file=no -e 'finalizer(x->@info(x), "Hello")'`
523523
output = readchomp(pipeline(cmd, stderr=catcmd))
524524
@test occursin("Info: Hello", output)
525525
end
@@ -614,7 +614,7 @@ end
614614

615615
let text = "input-test-text"
616616
b = PipeBuffer()
617-
proc = open(Base.CmdRedirect(Base.CmdRedirect(```$(Base.julia_cmd()) -E '
617+
proc = open(Base.CmdRedirect(Base.CmdRedirect(```$exename --startup-file=no -E '
618618
in14 = Base.open(RawFD(14))
619619
out15 = Base.open(RawFD(15))
620620
write(out15, in14)'```,

0 commit comments

Comments
 (0)