From 15e819cde18db994931770739aad64f56a33becc Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Fri, 13 Dec 2019 11:18:07 +0100 Subject: [PATCH] more targets --- .gitignore | 3 +++ Makefile | 20 +++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6b016bfb5..20157262c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ Version.ml .vscode/ /ligo.install /_coverage/ +/_coverage_all/ +/_coverage_ligo/ +/_coverage_cli/ diff --git a/Makefile b/Makefile index 896116f52..49402e6d1 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,22 @@ test: build eval $$(opam config env) scripts/test_ligo.sh -coverage: +clean: dune clean + +coverage: clean BISECT_ENABLE=yes dune runtest --force - bisect-ppx-report html - bisect-ppx-report summary + bisect-ppx-report html -o ./_coverage_all --title="LIGO overall test coverage" + 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}' \ No newline at end of file