Skip to content

Commit

Permalink
Check with coverage off
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jul 29, 2021
1 parent 962209e commit 01b5679
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ jobs:
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- name: Bounds check
- name: Coverage off # `empty_func` test doesn't work as intended with `coverage=true`
if: ${{ matrix.os == 'ubuntu-latest' }}
run: julia --project -e 'using Pkg; Pkg.test("Cthulhu"; coverage=false)'
- name: Bounds/DCE check
if: ${{ matrix.os == 'ubuntu-latest' }}
run: julia --project --code-coverage -e 'using Pkg; Pkg.add(["Revise", "StaticArrays"]); cd("test"); include("runtests.jl")'
- uses: julia-actions/julia-processcoverage@v1
Expand Down
2 changes: 2 additions & 0 deletions src/Cthulhu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ function lookup(interp::CthulhuInterpreter, mi::MethodInstance, optimize::Bool)
infos = ir.stmts.info
slottypes = ir.argtypes
else
# This doesn't showed up as covered, but it is (see the CI test with `coverage=false`).
# But with coverage on, the empty function body isn't empty due to :code_coverage_effect expressions.
codeinf = nothing
infos = []
slottypes = Any[Base.unwrap_unionall(mi.specTypes).parameters...]
Expand Down

0 comments on commit 01b5679

Please sign in to comment.