33
44source ../../common.tst
55
6- rm -f test.cpp * .gcno * .gcda a.out * .info * .log * .json diff.txt loop* .rc markers.err*
6+ rm -f test.cpp * .gcno * .gcda a.out * .info * .log * .json diff.txt loop* .rc markers.err* readThis.rc testing.rc
77rm -rf select criteria annotate empty unused_src scriptErr scriptFixed epoch inconsistent highlight etc mycache cacheFail expect subset context labels sortTables
88
99clean_cover
@@ -172,6 +172,12 @@ if [ 0 != $? ] ; then
172172fi
173173echo lcov $LCOV_OPTS --summary initial.info --prune --ignore usage
174174$COVER $LCOV_TOOL $LCOV_OPTS --summary initial.info --prune --ignore usgae 2>&1 | tee prune_warn.log
175+ if [ 0 != $? ] ; then
176+ echo " ERROR: lcov prune faled"
177+ if [ 0 == $KEEP_GOING ] ; then
178+ exit 1
179+ fi
180+ fi
175181
176182echo lcov $LCOV_OPTS --capture -d . -o build.info --build-dir x/y
177183$COVER $LCOV_TOOL $LCOV_OPTS --capture -d . -o build.info --build-dir x/y 2>&1 | tee build_dir_err.log
207213
208214
209215echo lcov $LCOV_OPTS --summary initial.info --config-file noSuchFile --ignore usage
210- $COVER $LCOV_TOOL $LCOV_OPTS --summary initial.info --config-file noSuchFile --ignore usgae 2>&1 | tee err_missing.log
216+ $COVER $LCOV_TOOL $LCOV_OPTS --summary initial.info --config-file noSuchFile 2>&1 | tee err_missing.log
217+ if [ 0 == ${PIPESTATUS[0]} ] ; then
218+ echo " ERROR: didn't exit after self missing config file error"
219+ if [ 0 == $KEEP_GOING ] ; then
220+ exit 1
221+ fi
222+ fi
211223grep " cannot read configuration file 'noSuchFile'" err_missing.log
212224if [ 0 != $? ] ; then
213225 echo " ERROR: missing config file message"
@@ -216,10 +228,34 @@ if [ 0 != $? ] ; then
216228 fi
217229fi
218230
231+ # read a config file which is there...
232+ echo " message_log = message_file.log" > testing.rc
233+ echo " config_file = testing.rc" > readThis.rc
234+ echo lcov $LCOV_OPTS --summary initial.info --config-file readThis.rc
235+ $COVER $LCOV_TOOL $LCOV_OPTS --summary initial.info --config-file readThis.rc
236+ if [ ! == ${PIPESTATUS[0]} ] ; then
237+ echo " ERROR: didn't read config file"
238+ if [ 0 == $KEEP_GOING ] ; then
239+ exit 1
240+ fi
241+ fi
242+ if [ ! -f message_file.log] ; then
243+ echo " ERROR: didn't honor message_log"
244+ if [ 0 == $KEEP_GOING ] ; then
245+ exit 1
246+ fi
247+ fi
248+
219249# loop in config file inclusion
220250echo " config_file = loop1.rc" > loop1.rc
221251echo lcov $LCOV_OPTS --summary initial.info --config-file loop1.rc --ignore usage
222252$COVER $LCOV_TOOL $LCOV_OPTS --summary initial.info --config-file loop1.rc --ignore usage 2>&1 | tee err_selfloop.log
253+ if [ 0 == ${PIPESTATUS[0]} ] ; then
254+ echo " ERROR: skipped self loop error - which isn't supposed to be possible right now"
255+ if [ 0 == $KEEP_GOING ] ; then
256+ exit 1
257+ fi
258+ fi
223259grep " config file inclusion loop" err_selfloop.log
224260if [ 0 != $? ] ; then
225261 echo " ERROR: missing config file message"
@@ -232,6 +268,12 @@ echo "config_file = loop3.rc" > loop2.rc
232268echo ' config_file = $ENV{PWD}/loop2.rc' > loop3.rc
233269echo lcov $LCOV_OPTS --summary initial.info --config-file loop2.rc --ignore usage
234270$COVER $LCOV_TOOL $LCOV_OPTS --summary initial.info --config-file loop2.rc --ignore usage 2>&1 | tee err_loop.log
271+ if [ 0 == ${PIPESTATUS[0]} ] ; then
272+ echo " ERROR: skipped self loop error2 - which isn't supposed to be possible"
273+ if [ 0 == $KEEP_GOING ] ; then
274+ exit 1
275+ fi
276+ fi
235277grep " config file inclusion loop" err_loop.log
236278if [ 0 != $? ] ; then
237279 echo " ERROR: missing config file message"
0 commit comments