Skip to content

Commit 49b112c

Browse files
authored
Make coverage generation include results from cram tests (#1887)
* Make coverage generation include results from cram tests * Remove redundant bisect flag * Unify directory paths * check coverage directory contents * Revert "check coverage directory contents" This reverts commit 9b88761. * Create coverage directory beforehand
1 parent 577110d commit 49b112c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/coverage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ jobs:
5959
run: ./make.sh headers
6060

6161
- name: Test
62-
run: opam exec -- dune runtest --instrument-with bisect_ppx
62+
env:
63+
BISECT_FILE: ${{ github.workspace }}/_build/coverage/bisect
64+
run: |
65+
mkdir -p _build/coverage
66+
opam exec -- dune runtest --force --instrument-with bisect_ppx
6367
6468
- run: opam exec -- bisect-ppx-report send-to Coveralls
6569
env:

docs/developer-guide/testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ To run `bisect_ppx` locally:
189189

190190
1. Install bisect_ppx with `opam install bisect_ppx`.
191191
2. Run `make coverage` to build Goblint with bisect_ppx instrumentation.
192-
3. Run tests with coverage: `dune runtest --instrument-with bisect_ppx` (this will now generate `.coverage` files in various directories).
193-
4. Generate coverage report with `bisect-ppx-report html`.
194-
5. After that the generated `.coverage` files can be removed with `find . -type f -name '*.coverage' -delete`.
192+
3. Run tests with coverage: `mkdir -p _build/coverage ; BISECT_FILE="$(pwd)/_build/coverage/bisect" dune runtest --force --instrument-with bisect_ppx` (this will generate `.coverage` files into the directory `_build/coverage`).
193+
4. Generate coverage report with `bisect-ppx-report html`.
194+
Note: after that the generated `.coverage` files can be removed (e.g., with `find . -type f -name '*.coverage' -delete` or by deleting `_build/coverage`).
195195
6. The HTML report can be found in the `_coverage` folder.

0 commit comments

Comments
 (0)