diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4fd0d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ocaml/_coverage diff --git a/ocaml/dune-project b/ocaml/dune-project index a1e3d6d..2a2ffb2 100644 --- a/ocaml/dune-project +++ b/ocaml/dune-project @@ -24,6 +24,7 @@ (depends (ocaml (>= 5.3.0)) (dune (>= 3.17.2)) + (bisect_ppx (and :dev (>= 2.5.0))) ) ) diff --git a/ocaml/justfile b/ocaml/justfile new file mode 100644 index 0000000..4a9ad9d --- /dev/null +++ b/ocaml/justfile @@ -0,0 +1,25 @@ +default: + @just --list + +build : + dune build + +test : + dune build + dune test + +format : + dune fmt; dune promote + +check-format : + dune build fmt + +cover : + find . -name '*.coverage' -exec rm -v '{}' ';' + dune build + dune runtest --instrument-with bisect_ppx --force + bisect-ppx-report html + bisect-ppx-report summary + +clean : + dune clean diff --git a/ocaml/lib/dune b/ocaml/lib/dune index 8c5b22d..872c4ef 100644 --- a/ocaml/lib/dune +++ b/ocaml/lib/dune @@ -1,6 +1,7 @@ (library (name tori) (libraries unix) + (instrumentation (backend bisect_ppx)) ) (include_subdirs qualified) diff --git a/ocaml/tori.opam b/ocaml/tori.opam index baff66b..ab446cc 100644 --- a/ocaml/tori.opam +++ b/ocaml/tori.opam @@ -18,6 +18,7 @@ doc: "https://tori.jutty.dev/docs" depends: [ "ocaml" {>= "5.3.0"} "dune" {>= "3.17" & >= "3.17.2"} + "bisect_ppx" {dev & >= "2.5.0"} "odoc" {with-doc} ] build: [