diff options
| author | Alasdair Armstrong | 2018-12-26 15:24:55 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-12-26 15:24:55 +0000 |
| commit | e0479ea3c479547c093ade9f675e5a0a652e8a34 (patch) | |
| tree | b4e939131642a7e97b4c1bae89531fc728187210 /src | |
| parent | 0a293f2e7ca72e1dc422f0035d271d7dc39cfcb2 (diff) | |
Add makefile target for building with Bisect coverage
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 5 | ||||
| -rw-r--r-- | src/_tags | 5 | ||||
| -rw-r--r-- | src/myocamlbuild.ml | 2 |
3 files changed, 9 insertions, 3 deletions
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 @@ -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"; |
