in case of failure, failing result files are not listed
This commit is contained in:
+4
-1
@@ -29,6 +29,7 @@ READER="${CMD_PREFIX} ../example/ndpiReader${EXE_SUFFIX} -A -p ../example/protos
|
|||||||
|
|
||||||
RC=0
|
RC=0
|
||||||
PCAPS=`cd pcap; /bin/ls *.pcap *.pcapng *.cap`
|
PCAPS=`cd pcap; /bin/ls *.pcap *.pcapng *.cap`
|
||||||
|
FAILURES=()
|
||||||
|
|
||||||
if [ ! -x "../example/ndpiReader${EXE_SUFFIX}" ]; then
|
if [ ! -x "../example/ndpiReader${EXE_SUFFIX}" ]; then
|
||||||
echo "$0: Missing ../example/ndpiReader${EXE_SUFFIX}"
|
echo "$0: Missing ../example/ndpiReader${EXE_SUFFIX}"
|
||||||
@@ -110,6 +111,7 @@ check_results() {
|
|||||||
else
|
else
|
||||||
printf "%-48s\tERROR (ndpiReader${EXE_SUFFIX} exit code: ${CMD_RET})\n" "$f"
|
printf "%-48s\tERROR (ndpiReader${EXE_SUFFIX} exit code: ${CMD_RET})\n" "$f"
|
||||||
RC=$(( RC + 1 ))
|
RC=$(( RC + 1 ))
|
||||||
|
FAILURES+=("$f.out")
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -123,6 +125,7 @@ check_results() {
|
|||||||
${CMD_WDIFF} -n -3 result/$f.out /tmp/reader.$$.out | sort | uniq | ${CMD_COLORDIFF}
|
${CMD_WDIFF} -n -3 result/$f.out /tmp/reader.$$.out | sort | uniq | ${CMD_COLORDIFF}
|
||||||
fi
|
fi
|
||||||
RC=$(( RC + 1 ))
|
RC=$(( RC + 1 ))
|
||||||
|
FAILURES+=("$f.out")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/bin/rm -f /tmp/reader.$$.out
|
/bin/rm -f /tmp/reader.$$.out
|
||||||
@@ -145,5 +148,5 @@ build_results
|
|||||||
check_results $*
|
check_results $*
|
||||||
|
|
||||||
test ${RC} -ne 0 && printf '%s: %s\n' "${0}" "${RC} pcap(s) failed"
|
test ${RC} -ne 0 && printf '%s: %s\n' "${0}" "${RC} pcap(s) failed"
|
||||||
|
test ${RC} -ne 0 && echo "Failed: ${FAILURES[@]}"
|
||||||
exit $RC
|
exit $RC
|
||||||
|
|||||||
Reference in New Issue
Block a user