Skip to content

Commit

Permalink
Merge 3317b0e into 3020f1a
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Nov 12, 2020
2 parents 3020f1a + 3317b0e commit ec007a7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 35 deletions.
34 changes: 22 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
branches:
only:
- master
- staging
- trying
- /^release\/.*$/ # release branches
- /^v[0-9]+\.[0-9]+\.[0-9]+$/ # version tags

language: julia

os:
- linux
- osx
- windows

arch:
- x64

julia:
- "1.0"
- "1.2"
- "1.3"
- "1" # currently 1.5
- nightly

matrix:
jobs:
fast_finish: true
allow_failures:
- julia: nightly

notifications:
email: false
# Test 32-bit only on Linux
exclude:
- arch: x86
os: osx
- arch: x86
os: windows

codecov: true
coveralls: true

script:
- julia --check-bounds=yes etc/travis-test.jl
- julia --check-bounds=yes etc/travis-coverage.jl
notifications:
webhooks: https://coveralls.io/webhook
email: false
10 changes: 0 additions & 10 deletions etc/travis-coverage.jl

This file was deleted.

3 changes: 0 additions & 3 deletions etc/travis-test.jl

This file was deleted.

28 changes: 18 additions & 10 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,21 @@ end
run(`$(Base.julia_cmd()) --startup-file=no --code-coverage=user -e $cmdstr`)
r = process_file(srcname, datadir)

target = if VERSION >= v"1.5.0-DEV.42"
CoverageTools.CovCount[nothing, 1, nothing, 0, nothing, 0, nothing, nothing, nothing, nothing, 0, nothing, nothing, nothing, nothing, nothing, 0, nothing, nothing, 0, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing]
target = if VERSION >= v"1.5"
CoverageTools.CovCount[nothing, 1, nothing, 0, nothing, 0, nothing, nothing, nothing, nothing, 0, nothing, nothing, nothing, nothing, 0, 0, nothing, nothing, 0, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing]
else
CoverageTools.CovCount[nothing, 2, nothing, 0, nothing, 0, nothing, nothing, nothing, nothing, 0, nothing, nothing, nothing, nothing, nothing, 0, nothing, nothing, 0, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing]
end
target_disabled = map(x -> (x !== nothing && x > 0) ? x : nothing, target)
@test r.coverage == target

covtarget = (sum(x->x !== nothing && x > 0, target), sum(x->x !== nothing, target))
covtarget = (sum(x -> x !== nothing && x > 0, target), sum(!isnothing, target))
@test get_summary(r) == covtarget
@test get_summary(process_folder(datadir)) == (98, 106)
if VERSION >= v"1.5"
@test get_summary(process_folder(datadir)) == (98, 107)
else
@test get_summary(process_folder(datadir)) == (98, 106)
end

r_disabled = withenv("DISABLE_AMEND_COVERAGE_FROM_SRC" => "yes") do
process_file(srcname, datadir)
Expand Down Expand Up @@ -167,16 +171,20 @@ end
end
# FIXME: coverage information for this function is useless with Julia 1.0
if VERSION >= v"1.1"
@test r.coverage == if VERSION >= v"1.5.0-DEV.42"
[nothing, 1, 1, 1, nothing, 1, nothing, 1, nothing]
if VERSION >= v"1.6"
@test r.coverage == [1, 1, 1, 1, nothing, 1, nothing, 1, nothing]
elseif VERSION >= v"1.5"
@test r.coverage == [nothing, 1, 1, 1, nothing, 1, nothing, 1, nothing]
else
[nothing, 2, 1, 1, nothing, 1, nothing, 1, nothing, nothing]
@test r.coverage == [nothing, 2, 1, 1, nothing, 1, nothing, 1, nothing, nothing]
end
amend_coverage_from_src!(r.coverage, r.filename)
@test r.coverage == if VERSION >= v"1.5.0-DEV.42"
[nothing, 1, nothing, 1, nothing, nothing, nothing, 1, nothing]
if VERSION >= v"1.6"
@test r.coverage == [1, 1, nothing, 1, nothing, nothing, nothing, 1, nothing]
elseif VERSION >= v"1.5"
@test r.coverage == [nothing, 1, nothing, 1, nothing, nothing, nothing, 1, nothing]
else
[nothing, 2, nothing, 1, nothing, nothing, nothing, 1, nothing, nothing]
@test r.coverage == [nothing, 2, nothing, 1, nothing, nothing, nothing, 1, nothing, nothing]
end
end
end
Expand Down

0 comments on commit ec007a7

Please sign in to comment.