Skip to content

Commit

Permalink
Integrate coverage build better
Browse files Browse the repository at this point in the history
odoc is now always built with coverage in development, so one doesn't
have to run make clean when switching between coverage and regular
testing.

The Dune --force option requires Jbuilder >= 1.0+beta17.
  • Loading branch information
aantron committed Apr 15, 2018
1 parent 9ee1fae commit cd570b2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ BISECT_FILES_PATTERN := _build/default/test/*/bisect*.out

.PHONY : coverage
coverage :
BISECT_ENABLE=yes jbuilder build --dev @tester
find . -name 'bisect*.out' | xargs rm -f
(cd _build/default/test/parser && ./test.exe) || true
(cd _build/default/test/html && ./test.exe) || true
jbuilder build @test/parser/runtest --dev --no-buffer -j 1 --force
jbuilder build @test/html/runtest --dev --no-buffer -j 1 --force
@bisect-ppx-report \
-I _build/default/ -html $(COVERAGE)/ \
-text - -summary-only \
Expand Down
2 changes: 1 addition & 1 deletion odoc.opam
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ depends: [
"cmdliner" {build}
"cppo" {build}
"fpath" {build}
"jbuilder" {build & >= "1.0+beta10"}
"jbuilder" {build & >= "1.0+beta17"}
"tyxml" {build & >= "4.0.0"}

# Development dependencies. These should be removed in opam files sent to the
Expand Down
2 changes: 1 addition & 1 deletion src/html/jbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

(library
((name html)
(preprocess (pps (bisect_ppx -conditional)))
(preprocess (pps (bisect_ppx)))
(libraries (model tyxml))))
2 changes: 1 addition & 1 deletion src/parser/jbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

(library
((name parser_)
(preprocess (pps (bisect_ppx -conditional)))
(preprocess (pps (bisect_ppx)))
(libraries (model))))

0 comments on commit cd570b2

Please sign in to comment.