3
3
4
4
source ../../common.tst
5
5
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
7
7
rm -rf select criteria annotate empty unused_src scriptErr scriptFixed epoch inconsistent highlight etc mycache cacheFail expect subset context labels sortTables
8
8
9
9
clean_cover
@@ -172,6 +172,12 @@ if [ 0 != $? ] ; then
172
172
fi
173
173
echo lcov $LCOV_OPTS --summary initial.info --prune --ignore usage
174
174
$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
175
181
176
182
echo lcov $LCOV_OPTS --capture -d . -o build.info --build-dir x/y
177
183
$COVER $LCOV_TOOL $LCOV_OPTS --capture -d . -o build.info --build-dir x/y 2>&1 | tee build_dir_err.log
207
213
208
214
209
215
echo 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
211
223
grep " cannot read configuration file 'noSuchFile'" err_missing.log
212
224
if [ 0 != $? ] ; then
213
225
echo " ERROR: missing config file message"
@@ -216,10 +228,34 @@ if [ 0 != $? ] ; then
216
228
fi
217
229
fi
218
230
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
+
219
249
# loop in config file inclusion
220
250
echo " config_file = loop1.rc" > loop1.rc
221
251
echo lcov $LCOV_OPTS --summary initial.info --config-file loop1.rc --ignore usage
222
252
$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
223
259
grep " config file inclusion loop" err_selfloop.log
224
260
if [ 0 != $? ] ; then
225
261
echo " ERROR: missing config file message"
@@ -232,6 +268,12 @@ echo "config_file = loop3.rc" > loop2.rc
232
268
echo ' config_file = $ENV{PWD}/loop2.rc' > loop3.rc
233
269
echo lcov $LCOV_OPTS --summary initial.info --config-file loop2.rc --ignore usage
234
270
$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
235
277
grep " config file inclusion loop" err_loop.log
236
278
if [ 0 != $? ] ; then
237
279
echo " ERROR: missing config file message"
0 commit comments