Issueing pacifier messages in run_all_releng about logged line

This commit is contained in:
Thomas Schmitt 2011-07-17 13:08:52 +00:00
parent 5c1c678df8
commit 93678fb4f2

View File

@ -10,6 +10,28 @@ not_in_releng_exit() {
exit 1
}
# Using only bash builtin commands.
# On 4 year old amd64 x2 3000 MHz, xterm local,it counts 22471 lines per second
# On 2 year old amd64 x4 2600 MHz, ssh remote, it counts 35348 lines per second
count_lines()
{
# $1 if not empty: start count
line=
if test -n "$1"
then
count="$1"
else
count=0
fi
while read line
do
count=$(($count + 1))
printf "\r %4d lines logged ... " "$count" >&2
printf "%s\n" "$line"
done
return 0
}
# It is not a good idea to include inc/releng_getopts.inc with the
# master script as it calls the subordinate scripts and they include
# this file too, and we want to avoid sharing variable with subshells
@ -29,7 +51,8 @@ next_is=
for i in "$@"
do
if test "$next_is" = "ignore"
then :
then
dummy=dummy
elif test "$next_is" = "x"
then
RELENG_XORRISO="$i"
@ -90,10 +113,11 @@ fi
for s in `ls | grep ^releng_ | grep -v ${SELF} | sort -n`; do
if [ -x ${s} -a ! -d ${s} ]; then
echo -ne "\n\n_STARTING_TEST_________________________________________________________" >> ${CLOG}
echo -ne "\n${SELF}: Running ./${s} ${PASSED_OPTIONS}..." | tee -a ${CLOG}
echo -ne "\n${SELF}: Running ./${s} ${PASSED_OPTIONS} :\n" \
| tee -a ${CLOG}
T1=`date '+%s'`
set +e
./${s} ${PASSED_OPTIONS} &>> ${CLOG}
./${s} ${PASSED_OPTIONS} 2>&1 | count_lines >> ${CLOG}
RET=$?
T2=`date '+%s'`
let TS="${T2} - ${T1}"