File: run-coverage

package info (click to toggle)
haskell-knob 0.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 92 kB
  • sloc: haskell: 420; sh: 48; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 563 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
if [ ! -f 'knob.cabal' ]; then
	echo -n "Can't find knob.cabal; please run this script as"
	echo -n " ./scripts/run-coverage from within the knob source"
	echo " directory"
	exit 1
fi

. scripts/common.bash

require_cabal_dev

pushd tests
$CABAL_DEV -s ../cabal-dev install --flags="coverage" || exit 1
popd

rm -f knob_tests.tix
cabal-dev/bin/knob_tests $@

EXCLUDES="--exclude=Main"

hpc markup --srcdir=src/ --srcdir=tests/ knob_tests.tix --destdir=hpc-markup $EXCLUDES > /dev/null
hpc report --srcdir=src/ --srcdir=tests/ knob_tests.tix $EXCLUDES