summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--src/Makefile5
-rw-r--r--src/_tags5
-rw-r--r--src/myocamlbuild.ml2
4 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 40040a11..6ce13857 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,10 @@ isail:
$(MAKE) -C src isail
ln -f -s src/isail.native sail
+coverage:
+ $(MAKE) -C src coverage
+ ln -f -s src/isail.native sail
+
install:
if [ -z "$(SHARE_DIR)" ]; then echo SHARE_DIR is unset; false; fi
mkdir -p $(INSTALL_DIR)/bin
diff --git a/src/Makefile b/src/Makefile
index b658d90d..aeb23b9e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -62,7 +62,7 @@ endif
endif
-.PHONY: all sail sail.native sail.byte manifest.ml test clean doc lib power test_power test_idempotence
+.PHONY: all sail coverage sail.native sail.byte manifest.ml test clean doc lib power test_power test_idempotence
# set to -p on command line to enable gprof profiling
OCAML_OPTS?=
@@ -103,6 +103,9 @@ sail: ast.ml bytecode.ml manifest.ml
isail: ast.ml bytecode.ml manifest.ml
ocamlbuild -use-ocamlfind isail.native
+coverage: ast.ml bytecode.ml manifest.ml
+ BISECT_COVERAGE=YES ocamlbuild -use-ocamlfind -plugin-tag 'package(bisect_ppx-ocamlbuild)' isail.native
+
sail.native: sail
sail.byte: ast.ml bytecode.ml manifest.ml
diff --git a/src/_tags b/src/_tags
index 826e87a5..6747424d 100644
--- a/src/_tags
+++ b/src/_tags
@@ -1,8 +1,9 @@
true: -traverse, debug, use_menhir
-<**/*.ml>: bin_annot, annot
+<**/parser.ml>: bin_annot, annot
+<**/*.ml> and not <**/parser.ml>: bin_annot, annot, coverage
<sail.{byte,native}>: package(zarith), package(linksem), package(lem), package(omd), use_pprint
-<isail.{byte,native}>: package(zarith), package(linenoise), package(linksem), package(lem), package(omd), use_pprint
+<isail.{byte,native}>: package(zarith), package(linenoise), package(linksem), package(lem), package(omd), use_pprint, coverage
<isail.ml>: package(linenoise)
<elf_loader.ml>: package(linksem)
diff --git a/src/myocamlbuild.ml b/src/myocamlbuild.ml
index f408703f..b1f95339 100644
--- a/src/myocamlbuild.ml
+++ b/src/myocamlbuild.ml
@@ -79,6 +79,8 @@ let lem_opts = [A "-lib"; P "../gen_lib";
dispatch begin function
| After_rules ->
+ Bisect_ppx_plugin.handle_coverage ();
+
(* ocaml_lib "lem_interp/interp"; *)
ocaml_lib ~extern:false ~dir:"pprint/src" ~tag_name:"use_pprint" "pprint/src/PPrintLib";