more targets

This commit is contained in:
Lesenechal Remi 2019-12-13 11:18:07 +01:00
parent acee34985b
commit 15e819cde1
2 changed files with 20 additions and 3 deletions

3
.gitignore vendored
View File

@ -9,3 +9,6 @@ Version.ml
.vscode/ .vscode/
/ligo.install /ligo.install
/_coverage/ /_coverage/
/_coverage_all/
/_coverage_ligo/
/_coverage_cli/

View File

@ -31,8 +31,22 @@ test: build
eval $$(opam config env) eval $$(opam config env)
scripts/test_ligo.sh scripts/test_ligo.sh
coverage: clean:
dune clean dune clean
coverage: clean
BISECT_ENABLE=yes dune runtest --force BISECT_ENABLE=yes dune runtest --force
bisect-ppx-report html bisect-ppx-report html -o ./_coverage_all --title="LIGO overall test coverage"
bisect-ppx-report summary bisect-ppx-report summary --per-file
coverage-ligo: clean
BISECT_ENABLE=yes dune runtest src/test --force
bisect-ppx-report html -o ./_coverage_ligo --title="LIGO test coverage"
bisect-ppx-report summary --per-file
coverage-cli: clean
BISECT_ENABLE=yes dune runtest src/bin/expect_tests
bisect-ppx-report html -o ./_coverage_cli --title="CLI test coverage"
bisect-ppx-report summary --per-file
# PRE="CLI coverage: "
# bisect-ppx-report summary --per-file | grep 'src/bin/cli.ml\|src/bin/cli_helpers.ml' | awk -v ORS=" " '{print $1}' | awk -v PRE=${PRE} -v POST="%" '{print PRE ($1 + $2 / NF) POST}'