49cf061d17
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/bind#293d93455e05945f11b4ee320db6a2fa4f31e43c
48 lines
1.0 KiB
Bash
Executable File
48 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# This script will filter out output from BINDs tests
|
|
# It supports form from BIND 9.9 and BIND 9.11
|
|
# Its purpose is to display only failed tests from list of all tests
|
|
|
|
CURRENT_TEST=
|
|
CURRENT_OUTPUT=
|
|
STATUS_ONLY=
|
|
|
|
for P; do
|
|
case "$P" in
|
|
-s|--status) STATUS_ONLY=yes; shift ;;
|
|
esac
|
|
done
|
|
|
|
cat $@ | while read LINE; do
|
|
if [ "${LINE#S:}" != "$LINE" ]; then
|
|
CURRENT_TEST=`echo $LINE | cut -d: -f2`
|
|
CURRENT_OUTPUT="$LINE"$'\n'
|
|
elif [ "${LINE#R:}" != "$LINE" ]; then
|
|
# echo "$CURRENT_TEST $LINE"
|
|
if [ "${LINE/#R:*:*}" != "$LINE" ]; then
|
|
# more recent results contain test name
|
|
# R:dlz:FAIL
|
|
CURRENT_TEST="${LINE#R:}"
|
|
CURRENT_TEST="${CURRENT_TEST/%:*}"
|
|
RESULT="${LINE/#*:}"
|
|
else
|
|
# S:dlz:time
|
|
# R:FAIL
|
|
RESULT="${LINE/#R*:/}"
|
|
fi
|
|
if [ "$RESULT" != "PASS" ]; then
|
|
if [ -n "$STATUS_ONLY" ]; then
|
|
echo "$RESULT $CURRENT_TEST"
|
|
else
|
|
CURRENT_OUTPUT+="$LINE"
|
|
echo "$CURRENT_OUTPUT"
|
|
echo
|
|
fi
|
|
fi
|
|
CURRENT_OUTPUT=
|
|
else
|
|
CURRENT_OUTPUT+="$LINE"$'\n'
|
|
fi
|
|
done
|