Skip to content

Commit

Permalink
Update coverage setting propagation for tracked path mode (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Nov 6, 2024
1 parent 53fa79d commit b53b2da
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@ using jlpkg, Test, Pkg, Pkg.TOML
const root = joinpath(dirname(dirname(pathof(jlpkg))))
# --compile=yes required due to JuliaLang/julia#37059
# --code_coverage=@ replaced with "user"

function coverage_arg_string()
cc = Base.JLOptions().code_coverage
if cc < 3
("none", "user", "all")[cc+1]
elseif cc == 3
# path-specific coverage
"@$(unsafe_string(Base.JLOptions().tracked_path))"
end
end

const test_cmd = ```$(Base.julia_cmd()) $(jlpkg.default_julia_flags)
--code-coverage=$(cc = Base.JLOptions().code_coverage; cc == 0 ? "user" : cc == 2 ? "all" : "user")
--code-coverage=$(coverage_arg_string())
--compile=yes
--color=no
$(joinpath(root, "src", "cli.jl"))```
Expand Down

0 comments on commit b53b2da

Please sign in to comment.