diff --git a/Makefile b/Makefile index d0fb71a..6cde81b 100644 --- a/Makefile +++ b/Makefile @@ -7,19 +7,15 @@ build : .PHONY : test test : - dune runtest --no-buffer -j 1 - -BISECT_FILES_PATTERN := _build/default/test/bisect*.out -COVERAGE_DIR := _coverage + dune runtest .PHONY : coverage coverage : - BISECT_ENABLE=yes dune build @build-test - rm -rf $(BISECT_FILES_PATTERN) - (cd _build/default/test && ./test.exe) + find . -name '*.coverage' | xargs rm -f + dune runtest --instrument-with bisect_ppx --force bisect-ppx-report html --expect src/ --do-not-expect src/lambdasoup.ml bisect-ppx-report summary - @echo See $(COVERAGE_DIR)/index.html + @echo See _coverage/index.html BS4_MISSING := Beautiful Soup not installed. Skipping Python performance test. diff --git a/lambdasoup.opam b/lambdasoup.opam index 7988b5f..4aee631 100644 --- a/lambdasoup.opam +++ b/lambdasoup.opam @@ -18,7 +18,7 @@ depends: [ "markup" {>= "1.0.0"} "ocaml" {>= "4.02.0"} - "bisect_ppx" {dev & >= "2.0.0"} + "bisect_ppx" {dev & >= "2.5.0"} "ounit2" {with-test} ] diff --git a/src/dune b/src/dune index f0ca55a..a49ff48 100644 --- a/src/dune +++ b/src/dune @@ -1,20 +1,8 @@ -(* -*- tuareg -*- *) - -let preprocess = - match Sys.getenv "BISECT_ENABLE" with - | "yes" -> "(preprocess (pps bisect_ppx))" - | _ -> "" - | exception Not_found -> "" - -let () = Jbuild_plugin.V1.send @@ {| - (library (name soup) (public_name lambdasoup) (synopsis "Easy functional HTML scraping and manipulation") (wrapped false) (flags (:standard -w +A -warn-error -3)) - |} ^ preprocess ^ {| + (instrumentation (backend bisect_ppx)) (libraries markup)) - -|} diff --git a/test/dune b/test/dune index 5b806d2..7e82eab 100644 --- a/test/dune +++ b/test/dune @@ -3,10 +3,6 @@ (flags (:standard -w +A)) (libraries lambdasoup ounit2)) -(alias - (name build-test) - (deps test.exe (source_tree pages))) - (rule (alias runtest) (deps (source_tree pages))