in case of failure, failing result files are not listed

This commit is contained in:
Luca Deri
2023-02-27 12:20:15 +01:00
parent 96f0f85e56
commit 807c97344f
+4 -1
View File
@@ -29,6 +29,7 @@ READER="${CMD_PREFIX} ../example/ndpiReader${EXE_SUFFIX} -A -p ../example/protos
RC=0
PCAPS=`cd pcap; /bin/ls *.pcap *.pcapng *.cap`
FAILURES=()
if [ ! -x "../example/ndpiReader${EXE_SUFFIX}" ]; then
echo "$0: Missing ../example/ndpiReader${EXE_SUFFIX}"
@@ -110,6 +111,7 @@ check_results() {
else
printf "%-48s\tERROR (ndpiReader${EXE_SUFFIX} exit code: ${CMD_RET})\n" "$f"
RC=$(( RC + 1 ))
FAILURES+=("$f.out")
continue
fi
@@ -123,6 +125,7 @@ check_results() {
${CMD_WDIFF} -n -3 result/$f.out /tmp/reader.$$.out | sort | uniq | ${CMD_COLORDIFF}
fi
RC=$(( RC + 1 ))
FAILURES+=("$f.out")
fi
/bin/rm -f /tmp/reader.$$.out
@@ -145,5 +148,5 @@ build_results
check_results $*
test ${RC} -ne 0 && printf '%s: %s\n' "${0}" "${RC} pcap(s) failed"
test ${RC} -ne 0 && echo "Failed: ${FAILURES[@]}"
exit $RC