Skip to content

Commit

Permalink
Use DEPOT_PATH instead of HOME in cmdlineargs test (#38855)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored Dec 13, 2020
1 parent ddd977d commit 8f2b0e7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,10 @@ let exename = `$(Base.julia_cmd()) --startup-file=no`
println(ARGS)
""")
close(io)
mkpath(joinpath(dir, ".julia", "config"))
cp(testfile, joinpath(dir, ".julia", "config", "startup.jl"))
mkpath(joinpath(dir, "config"))
cp(testfile, joinpath(dir, "config", "startup.jl"))

withenv((Sys.iswindows() ? "USERPROFILE" : "HOME") => dir) do
withenv("JULIA_DEPOT_PATH" => dir) do
output = "[\"foo\", \"-bar\", \"--baz\"]"
@test readchomp(`$exename $testfile foo -bar --baz`) == output
@test readchomp(`$exename $testfile -- foo -bar --baz`) == output
Expand All @@ -485,7 +485,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no`

a = joinpath(dir, "a.jl")
b = joinpath(dir, "b.jl")
c = joinpath(dir, ".julia", "config", "startup.jl")
c = joinpath(dir, "config", "startup.jl")

write(a, """
println(@__FILE__)
Expand All @@ -501,7 +501,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no`

readsplit(cmd) = split(readchomp(cmd), '\n')

withenv((Sys.iswindows() ? "USERPROFILE" : "HOME") => dir) do
withenv("JULIA_DEPOT_PATH" => dir) do
@test readsplit(`$exename $a`) ==
[a, a,
b, a]
Expand Down Expand Up @@ -610,9 +610,9 @@ let exename = Base.julia_cmd()
# --startup-file
let JL_OPTIONS_STARTUPFILE_ON = 1,
JL_OPTIONS_STARTUPFILE_OFF = 2
# `HOME=$tmpdir` to avoid errors in the user startup.jl, which hangs the tests. Issue #17642
# `JULIA_DEPOT_PATH=$tmpdir` to avoid errors in the user startup.jl, which hangs the tests. Issue #17642
mktempdir() do tmpdir
withenv("HOME"=>tmpdir) do
withenv("JULIA_DEPOT_PATH"=>tmpdir) do
@test parse(Int,readchomp(`$exename -E "Base.JLOptions().startupfile" --startup-file=yes`)) == JL_OPTIONS_STARTUPFILE_ON
end
end
Expand Down

4 comments on commit 8f2b0e7

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - successfully executed benchmarks. A full report can be found here. cc @christopher-dG

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

Please sign in to comment.