diff --git a/.github/workflows/ci-swift.yml b/.github/workflows/ci-swift.yml index 01d1598..33ec293 100644 --- a/.github/workflows/ci-swift.yml +++ b/.github/workflows/ci-swift.yml @@ -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"