7
7
PARALLEL=' --parallel 0'
8
8
PROFILE=" --profile"
9
9
CXX=' g++'
10
- COVER_DB=' cover_db'
11
10
LOCAL_COVERAGE=1
12
11
KEEP_GOING=0
13
12
@@ -34,8 +33,12 @@ while [ $# -gt 0 ] ; do
34
33
COVER_DB=$1
35
34
LOCAL_COVERAGE=0
36
35
shift
36
+ else
37
+ COVER_DB=' cover_db.dat'
37
38
fi
38
- COVER=" perl -MDevel::Cover=-db,${COVER_DB} ,-coverage,statement,branch,condition,subroutine "
39
+ export PYCOV_DB=" ${COVER_DB} _py"
40
+ COVER=" perl -MDevel::Cover=-db,${COVER_DB} ,-coverage,statement,branch,condition,subroutine,-silent,1 "
41
+ PYCOVER=" COVERAGE_FILE=$PYCOV_DB coverage run --branch --append"
39
42
;;
40
43
41
44
--home | -home )
@@ -125,8 +128,8 @@ DIFFCOV_OPTS="--function-coverage --branch-coverage --highlight --demangle-cpp -
125
128
# DIFFCOV_OPTS="--function-coverage --branch-coverage --highlight --demangle-cpp --frame"
126
129
# DIFFCOV_OPTS='--function-coverage --branch-coverage --highlight --demangle-cpp'
127
130
128
- rm -f test.cpp * .gcno * .gcda a.out * .info * .info.gz diff.txt diff_r.txt diff_broken.txt * .log * .err * .json dumper* results.xlsx annotate.{cpp,exe} c d
129
- rm -rf ./cover_db ./baseline ./current ./differential* ./reverse ./diff_no_baseline ./no_baseline ./no_annotation ./no_owners differential_nobranch reverse_nobranch baseline-filter* noncode_differential* broken mismatchPath elidePath ./cover_db ./criteria ./mismatched ./navigation differential_prop proportion ./annotate ./current-* ./current_prefix* select select2
131
+ rm -f test.cpp * .gcno * .gcda a.out * .info * .info.gz diff.txt diff_r.txt diff_broken.txt * .log * .err * .json dumper* results.xlsx annotate.{cpp,exe} c d ./cover_db_py
132
+ rm -rf ./cover_db ./baseline ./current ./differential* ./reverse ./diff_no_baseline ./no_baseline ./no_annotation ./no_owners differential_nobranch reverse_nobranch baseline-filter* noncode_differential* broken mismatchPath elidePath ./cover_db ./criteria ./mismatched ./navigation differential_prop proportion ./annotate ./current-* ./current_prefix* select select2 html_report
130
133
131
134
if [ " x$COVER " != ' x' ] && [ 0 != $LOCAL_COVERAGE ] ; then
132
135
cover -delete
@@ -1231,7 +1234,7 @@ if [ ! -f $SPREADSHEET ] ; then
1231
1234
SPREADSHEET=$LCOV_HOME /share/lcov/support-scripts/spreadsheet.py
1232
1235
fi
1233
1236
if [ -f $SPREADSHEET ] ; then
1234
- $PYCOVER $SPREADSHEET -o results.xlsx ` find . -name " *.json" `
1237
+ eval $PYCOVER $SPREADSHEET -o results.xlsx ` find . -name " *.json" `
1235
1238
if [ 0 != $? ] ; then
1236
1239
status=1
1237
1240
echo " ERROR: spreadsheet generation failed"
1252
1255
if [ " x$COVER " != " x" ] && [ 0 != $LOCAL_COVERAGE ] ; then
1253
1256
cover
1254
1257
${LCOV_HOME} /bin/perl2lcov -o perlcov.info --testname simple --version-script $GET_VERSION ./cover_db
1255
- ${LCOV_HOME} /bin/genhtml -o perlcov perlcov.info --flat --show-navigation --show_proportion --version-script $GET_VERSION --annotate-script $P4ANNOTATE
1258
+ ${LCOV_HOME} /bin/py2lcov -o pycov.info --testname simple --version-script $GET_VERSION $PYCOV_DB
1259
+ ${LCOV_HOME} /bin/genhtml -o html_report perlcov.info pycov.info --branch --flat --show-navigation --show-proportion --version-script $GET_VERSION --annotate-script $P4ANNOTATE --parallel --ignore empty,usage
1260
+ echo " see HTML report 'html_report'"
1256
1261
fi
1257
1262
1258
1263
exit $status
0 commit comments