Skip to content

Commit

Permalink
WIP on bisect_ppx
Browse files Browse the repository at this point in the history
Signed-off-by: Kakadu <Kakadu@pm.me>
  • Loading branch information
Kakadu committed May 5, 2023
1 parent d464603 commit da7c528
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_build
.merlin
.ocamlinit
/_coverage

11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,14 @@ uninstall:

clean:
dune clean

TEST_COV_D = /tmp/zanudacov

.PHONY: test_coverage
test_coverage:
if [ -d $(TEST_COV_D) ]; then rm -r $(TEST_COV_D); fi
mkdir -p $(TEST_COV_D)
BISECT_FILE=$(TEST_COV_D)/zanuda dune runtest --no-print-directory \
--instrument-with bisect_ppx --force
bisect-ppx-report html --coverage-path $(TEST_COV_D)
bisect-ppx-report summary --coverage-path $(TEST_COV_D)
4 changes: 4 additions & 0 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
ppx_sexp_conv
ppx_inline_test ; implies dependecy on base
))
(instrumentation
(backend bisect_ppx))
(inline_tests))

(executable
Expand All @@ -38,4 +40,6 @@
UntypedLints)
(preprocess
(pps ppx_inline_test))
(instrumentation
(backend bisect_ppx))
(package zanuda))
2 changes: 2 additions & 0 deletions src/pattern/dune
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
(libraries ppxlib)
(preprocess
(pps ppx_optcomp ppx_inline_test ppx_assert))
(instrumentation
(backend bisect_ppx))
(inline_tests))
2 changes: 2 additions & 0 deletions src/typed/dune
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@
Tuple_matching)
(preprocess
(pps ppx_inline_test ppxlib.metaquot))
(instrumentation
(backend bisect_ppx))
(inline_tests))
2 changes: 2 additions & 0 deletions src/unidiff/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
(libraries angstrom)
(preprocess
(pps ppx_inline_test))
(instrumentation
(backend bisect_ppx))
(inline_tests))
2 changes: 2 additions & 0 deletions src/untyped/dune
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
)
(preprocess
(pps ppxlib.metaquot ppx_expect))
(instrumentation
(backend bisect_ppx))
(inline_tests))
2 changes: 2 additions & 0 deletions tests/other.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$ zanuda --help > /dev/null
$ zanuda -dump-lints 1.json 2> /dev/null
4 changes: 3 additions & 1 deletion tests/typed/Equality.t/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(library
(name test_Equality)
(wrapped false)
(modules Equality))
(modules Equality)
(instrumentation
(backend bisect_ppx)))
2 changes: 2 additions & 0 deletions tests/untyped/ast_docs.t/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
(wrapped false)
; (modules stuff)
(modules_without_implementation ast)
(instrumentation
(backend bisect_ppx))
(flags
(:standard
;
Expand Down
2 changes: 2 additions & 0 deletions tests/untyped/dollar.t/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
(name test_dollar)
(wrapped false)
(modules dollar)
(instrumentation
(backend bisect_ppx))
(flags
(:standard
;
Expand Down
2 changes: 2 additions & 0 deletions tests/untyped/var_should_not_be_used.t/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
(name test_var_should_not_be_used)
(wrapped false)
(modules lib)
(instrumentation
(backend bisect_ppx))
(flags
(:standard
;
Expand Down

0 comments on commit da7c528

Please sign in to comment.