File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -8,23 +8,33 @@ mkdir -p $COVERAGE_DIR
88pushd $COVERAGE_DIR
99if [ -z " $KEEP " ]; then trap " popd; rm -rf $COVERAGE_DIR " EXIT; fi
1010
11+ # copy over everything
1112$( which cp) -r ../* .
1213
14+ # prepare the environment
15+ eval ` opam config env`
1316opam install bisect_ppx ocveralls -y
1417
18+ # run the tests with coverage enabled
1519export BISECT_ENABLE=YES
1620jbuilder runtest
1721
18- outs=$( find . | grep bisect.* .out)
19- bisect-ppx-report -I $( dirname $outs [1]) -text report $outs
20- bisect-ppx-report -I $( dirname $outs [1]) -summary-only -text summary $outs
21- if [ -n " $HTML " ]; then bisect-ppx-report -I $( dirname $outs [1]) -html ../html-report $outs ; fi
22+ # move all bisect files here
23+ find . -name ' bisect*.out' -exec mv {} . \;
24+
25+ DIRECTORIES=$( find _build/default -type d -not -path ' */\.*' )
26+ printf -v INCLUDES " -I %s" $DIRECTORIES
27+
28+ bisect-ppx-report bisect* .out $INCLUDES -text report
29+ bisect-ppx-report bisect* .out $INCLUDES -summary-only -text summary
30+ bisect-ppx-report bisect* .out $INCLUDES -html report-html
2231
2332if [ -n " $TRAVIS " ]; then
2433 echo " \$ TRAVIS set; running ocveralls and sending to coveralls.io..."
25- ocveralls --prefix _build/default $outs --send
34+ ocveralls --prefix _build/default bisect * .out --send
2635else
27- echo " \$ TRAVIS not set; displaying results of bisect-report..."
36+ echo " \$ TRAVIS not set; displaying results of bisect-ppx- report..."
2837 cat report
2938 cat summary
3039fi
40+
You can’t perform that action at this time.
0 commit comments