File: genCov.sh

package info (click to toggle)
gavodachs 2.11%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 8,972 kB
  • sloc: python: 100,078; xml: 3,014; javascript: 2,360; ansic: 918; sh: 216; makefile: 31
file content (29 lines) | stat: -rwxr-xr-x 955 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# Determine coverage attained by running both unit and regression tests.
# Yeah, it'd be cooler if we'd get there using only unit tests; but
# that'd be a serious amount of work.

COVERAGE=python3-coverage

# forked.cov is filled by testhelpers.ForkingSubprocess, but that
# only appends; hence, we have to clean it up before running stuff.
rm -f forked.cov

export COVERAGE_FILE=unittests.cov
$COVERAGE run --source gavo runAllTests.py

export COVERAGE_FILE=regressiontests.cov
$COVERAGE run --source gavo -m gavo.user.cli serve debug > /dev/null 2>&1 &
srvpid=$!
export COVERAGE_FILE=testrunner.cov
$COVERAGE run --source gavo -m gavo.user.cli test -T120 ALL
kill $srvpid

export COVERAGE_FILE=../tests/docgen.cov
(cd ../docs; $COVERAGE run --source gavo -m gavo.user.cli gendoc refdoc > /dev/null)

export -n COVERAGE_FILE
$COVERAGE combine unittests.cov regressiontests.cov testrunner.cov\
	forked.cov trial.cov docgen.cov

$COVERAGE report