+
+ # preferred, but breaks under bash
+ #egrep "$trigger_discount_str" /tmp/PID$$.log | while read state junk name
+ egrep "$trigger_discount_str" /tmp/PID$$.log | while read stuff
+ do
+ set stuff # this hack required because bash cant read into mult vars
+ state="$1"
+ name="$3"
+
+ if ! discount_an_checks $name.gcov >/tmp/PID$$.disc
+ then
+ (( errors++ ))
+ fi
+
+ tail -1 /tmp/PID$$.disc | grep '\['
+
+ if (( verbose > 1 )) # updated file was generated, keep here
+ then
+ echo "[INFO] discounted coverage info in: ${tfile##*/}.dcov"
+ fi
+
+ mv /tmp/PID$$.disc ${name##*/}.dcov
+ done
+ fi
+ )>/tmp/PID$$.noise 2>&1
+ if (( $? != 0 ))
+ then
+ (( ut_errors++ ))
+ cat /tmp/PID$$.noise
+ continue
+ fi
+
+ for x in *.gcov # merge any previous coverage file with this one
+ do
+ if [[ -e $x && -e $x- ]]
+ then
+ merge_cov $x $x- >/tmp/PID$$.mc
+ cp /tmp/PID$$.mc $x
+ rm $x-
+ fi
+ done
+
+ if (( ! quiet ))
+ then
+ cat /tmp/PID$$.noise