on master help sign in
Use test.sh to generate coverage info
f25a1ddHarendra Kumar
.circleci/config.yml+6−5
@@ -328,10 +328,6 @@ jobs:
328 - *restore
328 - *restore
329 - run:
329 - run:
330 name: Build and test with inspection, coverage, Werror
330 name: Build and test with inspection, coverage, Werror
331− environment:
332− BUILD: "cabal-v2"
333− COVERALLS_OPTIONS: "--repo-token=\"$REPO_TOKEN\" --coverage-mode=StrictlyFullLines --exclude-dir=test"
334− CABAL_PROJECT: "cabal.project.coverage"
335 command: |
331 command: |
336 apt-get install -y ghc-8.10.2
332 apt-get install -y ghc-8.10.2
337 apt-get install -y cabal-install-3.2
333 apt-get install -y cabal-install-3.2
@@ -339,7 +335,12 @@ jobs:
339 apt-get install -y libcurl4-gnutls-dev
335 apt-get install -y libcurl4-gnutls-dev
340 apt-get install -y git
336 apt-get install -y git
341 apt-get install libtinfo-dev
337 apt-get install libtinfo-dev
342− bash -c "$PACKCHECK $BUILD"
338+ cabal update
339+ PATH=$HOME/.cabal/bin:$PATH
340+ export PATH
341+ which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.coverage hpc-coveralls
342+ bin/test.sh --coverage --raw
343+ hpc-coveralls --repo-token="$REPO_TOKEN" --coverage-mode=StrictlyFullLines
343 no_output_timeout: 25m
344 no_output_timeout: 25m
344 - *save
345 - *save
345 hlint-src:
346 hlint-src:
bin/test.sh+3−1
@@ -35,6 +35,7 @@ set_common_vars
35COVERAGE=
35COVERAGE=
36MEASURE=1
36MEASURE=1
37HPC_REPORT_OPTIONS=
37HPC_REPORT_OPTIONS=
38+RAW=0
38
39
39# XXX add a bisect option
40# XXX add a bisect option
40while test -n "$1"
41while test -n "$1"
@@ -47,6 +48,7 @@ do
47 --hpc-report-options) shift; HPC_REPORT_OPTIONS=$1; shift ;;
48 --hpc-report-options) shift; HPC_REPORT_OPTIONS=$1; shift ;;
48 --rtsopts) shift; RTS_OPTIONS=$1; shift ;;
49 --rtsopts) shift; RTS_OPTIONS=$1; shift ;;
49 # flags
50 # flags
51+ --raw) RAW=1; shift ;;
50 --slow) SLOW=1; shift ;;
52 --slow) SLOW=1; shift ;;
51 --quick) QUICK_MODE=1; shift ;;
53 --quick) QUICK_MODE=1; shift ;;
52 --dev-build) RUNNING_DEVBUILD=1; shift ;;
54 --dev-build) RUNNING_DEVBUILD=1; shift ;;
@@ -140,7 +142,7 @@ fi
140# Run coverage reports
142# Run coverage reports
141#-----------------------------------------------------------------------------
143#-----------------------------------------------------------------------------
142
144
143−if test "$COVERAGE" -eq "1"
145+if test "$COVERAGE" -eq "1" -a "$RAW" -eq 0
144then
146then
145 TIXFILES=
147 TIXFILES=
146 for i in $TARGETS
148 for i in $TARGETS