Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/ci-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,29 @@ jobs:

- name: Coverage smoke test (math_test)
run: |
./pleasew --plain_output cover //test/swift/lib:math_test 2>&1 | tee cover.log
grep -Eq '^\s+Math\.swift [1-9][0-9]*/' cover.log
./pleasew --plain_output build //tools/common/lcovcheck
./pleasew --plain_output cover //test/swift/lib:math_test
plz-out/bin/tools/common/lcovcheck/lcovcheck -coverage-json plz-out/log/coverage.json -covered test/swift/lib/Math.swift
env:
VERITAS_NO_HOOK: "1"

- name: Coverage smoke test (mid_test, transitive dependencies)
run: |
./pleasew --plain_output cover //test/swift/chain:mid_test 2>&1 | tee cover.log
grep -Eq '^\s+Mid\.swift [1-9][0-9]*/' cover.log
grep -Eq '^\s+Base\.swift [1-9][0-9]*/' cover.log
./pleasew --plain_output build //tools/common/lcovcheck
./pleasew --plain_output cover //test/swift/chain:mid_test
plz-out/bin/tools/common/lcovcheck/lcovcheck -coverage-json plz-out/log/coverage.json \
-covered test/swift/chain/Mid.swift -covered test/swift/chain/Base.swift
env:
VERITAS_NO_HOOK: "1"

- name: Raw lcov export smoke test (functions and branches)
run: |
./pleasew --plain_output cover --rerun //test/swift/branches:branches_test 2>&1 | tee cover.log
f="plz-out/bin/test/swift/branches/branches_test.lcov"
grep -q '^SF:test/swift/branches/Branches\.swift$' "$f"
grep -Eq '^FNDA:0,.*unused' "$f"
grep -q '^BRDA:4,0,1,0$' "$f"
grep -q '^BRDA:12,0,0,0$' "$f"
./pleasew --plain_output build //tools/common/lcovcheck
./pleasew --plain_output cover --rerun //test/swift/branches:branches_test
plz-out/bin/tools/common/lcovcheck/lcovcheck \
-lcov plz-out/bin/test/swift/branches/branches_test.lcov \
-path test/swift/branches/Branches.swift \
-line 4=partial -line 12=partial -line 5=uncovered \
-function unused=missed -function classify=2
env:
VERITAS_NO_HOOK: "1"
Loading