OCaml: Add coverage reporting

This commit is contained in:
Juno Takano 2025-04-15 20:57:00 -03:00
commit db0fba664c
5 changed files with 29 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
ocaml/_coverage

View file

@ -24,6 +24,7 @@
(depends
(ocaml (>= 5.3.0))
(dune (>= 3.17.2))
(bisect_ppx (and :dev (>= 2.5.0)))
)
)

25
ocaml/justfile Normal file
View file

@ -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

View file

@ -1,6 +1,7 @@
(library
(name tori)
(libraries unix)
(instrumentation (backend bisect_ppx))
)
(include_subdirs qualified)

View file

@ -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: [