diff --git a/Makefile b/Makefile index 2512f01f32..dee0766892 100644 --- a/Makefile +++ b/Makefile @@ -81,9 +81,8 @@ ppx_let-test-deps : opam install --yes --unset-root ppx_let .PHONY: clean -clean: +clean : dune clean - find . -name '.merlin' | xargs rm -f rm -fr docs/api rm -f src/unix/discover_arguments for TEST in `ls -d test/packaging/*/*` ; \ @@ -102,11 +101,9 @@ EXPECTED_FILES := \ --do-not-expect src/unix/unix_c/ .PHONY: coverage -coverage: clean coverage-only - -.PHONY : coverage-only -coverage-only : - BISECT_ENABLE=yes $(MAKE) build +coverage : + rm -rf _build/default/test/ppx_expect + find _build -name '*.coverage' | xargs rm BISECT_ENABLE=yes dune runtest --force bisect-ppx-report html $(EXPECTED_FILES) bisect-ppx-report summary diff --git a/src/core/dune b/src/core/dune index 0b7a3091f7..0a433df90a 100644 --- a/src/core/dune +++ b/src/core/dune @@ -1,10 +1,21 @@ +(* -*- tuareg -*- *) + +let preprocess = + match Sys.getenv "BISECT_ENABLE" with + | "yes" -> "(preprocess (pps bisect_ppx))" + | _ | exception _ -> "" + +let () = Jbuild_plugin.V1.send @@ {| + (library (public_name lwt) (synopsis "Monadic promises and concurrent I/O") (wrapped false) - (preprocess (pps bisect_ppx --conditional)) + |} ^ preprocess ^ {| (libraries bytes result seq) (flags (:standard -w +A-29))) (documentation (package lwt)) + +|} diff --git a/src/ppx/dune b/src/ppx/dune index f39aa6e1df..7a13883a6c 100644 --- a/src/ppx/dune +++ b/src/ppx/dune @@ -1,3 +1,12 @@ +(* -*- tuareg -*- *) + +let bisect_ppx = + match Sys.getenv "BISECT_ENABLE" with + | "yes" -> "bisect_ppx" + | _ | exception _ -> "" + +let () = Jbuild_plugin.V1.send @@ {| + (library (name ppx_lwt) (public_name lwt_ppx) @@ -6,5 +15,7 @@ (libraries compiler-libs.common ocaml-migrate-parsetree ppx_tools_versioned) (ppx_runtime_libraries lwt) (kind ppx_rewriter) - (preprocess (pps ppx_tools_versioned.metaquot_410 bisect_ppx --conditional)) + (preprocess (pps ppx_tools_versioned.metaquot_410 |} ^ bisect_ppx ^ {|)) (flags (:standard -w +A-4))) + +|} diff --git a/src/react/dune b/src/react/dune index 318cb3c757..56946a3ece 100644 --- a/src/react/dune +++ b/src/react/dune @@ -1,3 +1,12 @@ +(* -*- tuareg -*- *) + +let preprocess = + match Sys.getenv "BISECT_ENABLE" with + | "yes" -> "(preprocess (pps bisect_ppx))" + | _ | exception _ -> "" + +let () = Jbuild_plugin.V1.send @@ {| + (rule (targets lwt_react.ml) (deps (:ml lwt_react.cppo.ml)) @@ -10,5 +19,7 @@ (synopsis "Reactive programming helpers for Lwt") (wrapped false) (libraries lwt react) - (preprocess (pps bisect_ppx --conditional)) + |} ^ preprocess ^ {| (flags (:standard -w +A))) + +|} diff --git a/src/unix/dune b/src/unix/dune index b1c6b7e536..b34125a646 100644 --- a/src/unix/dune +++ b/src/unix/dune @@ -1,3 +1,12 @@ +(* -*- tuareg -*- *) + +let preprocess = + match Sys.getenv "BISECT_ENABLE" with + | "yes" -> "(preprocess (pps bisect_ppx))" + | _ | exception _ -> "" + +let () = Jbuild_plugin.V1.send @@ {| + (rule (targets lwt_unix.ml) (deps (:ml lwt_unix.cppo.ml)) @@ -33,7 +42,7 @@ (optional) (wrapped false) (libraries bigarray lwt mmap ocplib-endian.bigstring threads unix) - (preprocess (pps bisect_ppx --conditional)) + |} ^ preprocess ^ {| (c_names lwt_unix_stubs lwt_libev_stubs @@ -167,3 +176,5 @@ (install_c_headers lwt_features lwt_config lwt_unix) (c_flags -I. (:include unix_c_flags.sexp)) (c_library_flags (:include unix_c_library_flags.sexp))) + +|} diff --git a/test/ppx_expect/dune b/test/ppx_expect/dune index f3a8d6fb5f..4d06644c62 100644 --- a/test/ppx_expect/dune +++ b/test/ppx_expect/dune @@ -2,8 +2,8 @@ (name main) (libraries lwttester)) -(alias - (name runtest) - (package lwt_ppx) - (deps (source_tree cases)) - (action (run %{exe:main.exe}))) +; (alias +; (name runtest) +; (package lwt_ppx) +; (deps (source_tree cases)) +; (action (run %{exe:main.exe})))