@@ -8,18 +8,7 @@ ENUMERATETEST_BIN="./enumeratetest"
CONFIG_H="../config.h"
export FILTERTEST_BIN TRANSLATETEST_BIN ENUMERATETEST_BIN CONFIG_H
-./TESTrun --passed --skipped 2>&1 | awk '
- /^Passed tests:/ { section = "PASS"; next }
- /^Skipped tests:/ { section = "SKIP"; next }
- /^Failed tests:/ { section = "FAIL"; next }
- /^-+$/ { section = ""; next }
- section != "" && /^ / {
- c = index($0, ": ")
- if (c >= 45) {
- label = substr($0, 5, c - 5)
- sub(/[[:space:]]+$/, "", label)
- if (label != "")
- print section ": " label
- }
- }
-'
+{ ./TESTrun --passed --skipped 2>&1 || echo "FAIL: libpcap"; } | sed \
+ -e '/^Passed tests:$/,/^$/ s/^ \([^ ][^ ]*\) *: .*/PASS: \1/' \
+ -e '/^Skipped tests:$/,/^$/ s/^ \([^ ][^ ]*\) *: .*/SKIP: \1/' \
+ -e '/^Failed tests:$/,/^INFO: / s/^ \([^ ][^ ]*\) *: .*/FAIL: \1/'
Replace awk with sed in run-ptest to preserve TESTrun error output. Report FAIL: libpcap when TESTrun exits non-zero. For example, with fcodetest (split out of filtertest in 1.11.1) missing from the image, ptest-runner.log only showed: BEGIN: /usr/lib/libpcap/ptest DURATION: 0 END: /usr/lib/libpcap/ptest and now with change shows: BEGIN: /usr/lib/libpcap/ptest ERROR: './testprogs/fcodetest -h' exit status was not 0. FAIL: libpcap DURATION: 1 END: /usr/lib/libpcap/ptest Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- .../libpcap/files/run-ptest | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)