Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Use Base.julia_cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Apr 24, 2020
1 parent 99f3989 commit 4a1d0b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
8 changes: 6 additions & 2 deletions test/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ filter!(file -> readline(file) != "# EXCLUDE FROM TESTING", examples)
cd(examples_dir) do
examples = relpath.(examples, Ref(examples_dir))
@testset for example in examples
cmd = julia_cmd(`$example`)
@test success(pipeline(cmd, stderr=stderr))
julia = `$(Base.julia_cmd()) --startup=no`
if Base.JLOptions().project != C_NULL
cmd = `$cmd --project=$(unsafe_string(Base.JLOptions().project))`
end

@test success(pipeline(`$julia $example`, stderr=stderr))
end
end

Expand Down
13 changes: 0 additions & 13 deletions test/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,3 @@ end
@test isa(fails[1], Test.Pass)
@test isa(fails[2], Test.Fail)
@test isa(fails[3], Test.Fail)

function julia_cmd(cmd)
return `
$(Base.julia_cmd())
--color=$(Base.have_color ? "yes" : "no")
--compiled-modules=$(Base.JLOptions().use_compiled_modules != 0 ? "yes" : "no")
--history-file=no
--startup-file=$(Base.JLOptions().startupfile != 2 ? "yes" : "no")
--code-coverage=$(["none", "user", "all"][1+Base.JLOptions().code_coverage])
$cmd
`
end

0 comments on commit 4a1d0b2

Please sign in to comment.