mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 18:00:41 +01:00
testbench: improve error reporting in dynstats-related tests
This commit is contained in:
parent
fe9e51efac
commit
8e83d6c280
@ -467,6 +467,8 @@ case $1 in
|
||||
cat $3 | grep -qF "$2"
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo content-check failed to find "'$2'" inside "'$3'"
|
||||
echo "file contents:"
|
||||
cat $3
|
||||
. $srcdir/diag.sh error-exit 1
|
||||
fi
|
||||
;;
|
||||
@ -474,6 +476,8 @@ case $1 in
|
||||
sum=$(cat $4 | grep $3 | sed -e $2 | awk '{s+=$1} END {print s}')
|
||||
if [ "x${sum}" != "x$5" ]; then
|
||||
echo sum of first column with edit-expr "'$2'" run over lines from file "'$4'" matched by "'$3'" equals "'$sum'" which is not equal to expected value of "'$5'"
|
||||
echo "file contents:"
|
||||
cat $4
|
||||
. $srcdir/diag.sh error-exit 1
|
||||
fi
|
||||
;;
|
||||
@ -481,6 +485,8 @@ case $1 in
|
||||
sum=$(cat $4 | grep $3 | sed -e $2 | awk '{s+=$1} END {print s}')
|
||||
if [ ! $sum -gt $5 ]; then
|
||||
echo sum of first column with edit-expr "'$2'" run over lines from file "'$4'" matched by "'$3'" equals "'$sum'" which is smaller than expected lower-limit of "'$5'"
|
||||
echo "file contents:"
|
||||
cat $4
|
||||
. $srcdir/diag.sh error-exit 1
|
||||
fi
|
||||
;;
|
||||
@ -488,6 +494,8 @@ case $1 in
|
||||
cat rsyslog.out.log | grep -q "$2"
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo content-check failed, not every line matched pattern "'$2'"
|
||||
echo "file contents:"
|
||||
cat $4
|
||||
. $srcdir/diag.sh error-exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user