From: Jason Ish Date: Thu, 4 May 2017 15:31:26 +0000 (-0600) Subject: remove more direct file comparisons X-Git-Tag: suricata-6.0.4~586 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1275f705cba9d89b4c646c3d35ee8eb944ba9e30;p=thirdparty%2Fsuricata-verify.git remove more direct file comparisons --- diff --git a/output-pcap-log/check.sh b/output-pcap-log/check.sh new file mode 100755 index 000000000..f2253d934 --- /dev/null +++ b/output-pcap-log/check.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +exec cmp expected/log.pcap.1444144603 output/log.pcap.1444144603 diff --git a/output-tcp-data/check.sh b/output-tcp-data/check.sh new file mode 100755 index 000000000..9430bf368 --- /dev/null +++ b/output-tcp-data/check.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +exec cmp expected/tcp-data.log output/tcp-data.log diff --git a/run.sh b/run.sh index 025bf72ad..e64c3c630 100755 --- a/run.sh +++ b/run.sh @@ -192,33 +192,11 @@ check_skip() { return 1 } -# Generic verification script. For any file in the expected directory, -# a comparison is done with the actual output. -generic_check() { - if [ ! -e "expected" ]; then - echo "error: test does not have a directory of expected output" - failed=yes - if [ "${continue}" != "yes" ]; then - exit 1 - fi - fi - for filename in $(find expected/ -type f); do - if ! cmp -s ${filename} output/$(basename ${filename}); then - echo "FAIL: output/$(basename ${filename})" - failed=yes - if [ "${continue}" != "yes" ]; then - exit 1 - fi - fi - done -} - # Check the output of Suricata. If a test doesn't provide its own # verification script, then the generic file compare will be # performed. check() { t="$1" - ( cd ${prefix}/${t} @@ -227,9 +205,8 @@ check() { exit 1 fi else - if ! generic_check; then - exit 1 - fi + echo "error: test has no check.sh script" + exit 1 fi ) return $?