Run regression tests from different locations at the same time w/o side effects on the results. (#1638)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
+5
-5
@@ -80,11 +80,11 @@ check_results() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f result/$f.out ]; then
|
if [ -f result/$f.out ]; then
|
||||||
CMD="$READER -q -K JSON -k /dev/null -t -i pcap/$f -w /tmp/reader.out -v 2"
|
CMD="$READER -q -K JSON -k /dev/null -t -i pcap/$f -w /tmp/reader.$$.out -v 2"
|
||||||
CPUPROFILE=result/$f.cprof HEAPPROFILE=result/$f $CMD
|
CPUPROFILE=result/$f.cprof HEAPPROFILE=result/$f $CMD
|
||||||
CMD_RET=$?
|
CMD_RET=$?
|
||||||
if [ $CMD_RET -eq 0 ]; then
|
if [ $CMD_RET -eq 0 ]; then
|
||||||
NUM_DIFF=`${CMD_DIFF} result/$f.out /tmp/reader.out | wc -l`
|
NUM_DIFF=`${CMD_DIFF} result/$f.out /tmp/reader.$$.out | wc -l`
|
||||||
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 ))
|
||||||
@@ -96,14 +96,14 @@ check_results() {
|
|||||||
else
|
else
|
||||||
printf "%-48s\tERROR\n" "$f"
|
printf "%-48s\tERROR\n" "$f"
|
||||||
echo "$CMD [old vs new]"
|
echo "$CMD [old vs new]"
|
||||||
${CMD_DIFF} result/$f.out /tmp/reader.out
|
${CMD_DIFF} result/$f.out /tmp/reader.$$.out
|
||||||
if [ ! -z "${CMD_COLORDIFF}" -a ! -z "${CMD_WDIFF}" ]; then
|
if [ ! -z "${CMD_COLORDIFF}" -a ! -z "${CMD_WDIFF}" ]; then
|
||||||
${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 ))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/bin/rm -f /tmp/reader.out
|
/bin/rm -f /tmp/reader.$$.out
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user