]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
rename verify.sh to check.sh
authorJason Ish <ish@unx.ca>
Wed, 4 Jan 2017 17:50:03 +0000 (11:50 -0600)
committerJason Ish <ish@unx.ca>
Wed, 4 Jan 2017 17:50:03 +0000 (11:50 -0600)
dns-tcp-multirequest-buffer-1/check.sh [moved from dns-tcp-multirequest-buffer-1/verify.sh with 100% similarity]
dns-udp-double-request-response/check.sh [moved from dns-udp-double-request-response/verify.sh with 100% similarity]
run.sh

diff --git a/run.sh b/run.sh
index fce9ce502dded88a9dbef019aa8b40805286f032..8421540a1b8eef290b5aa1c402b74ad1c1a25734 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -76,8 +76,9 @@ run_test() {
 
     # If test specific rules are not provided then use /dev/null to
     # avoid loading any.
-    if [ -e "${tdir}/test.rules" ]; then
-       args="${args} -S ${tdir}/test.rules"
+    rules=$(for n in ${tdir}/*.rules; do echo $n; break; done)
+    if [ -e "${rules}" ]; then
+       args="${args} -S ${rules}"
     else
        args="${args} -S /dev/null"
     fi
@@ -157,7 +158,7 @@ check_skip() {
 
 # Generic verification script. For any file in the expected directory,
 # a comparison is done with the actual output.
-generic_verify() {
+generic_check() {
     if [ ! -e "expected" ]; then
        echo "error: test does not have a directory of expected output"
        exit 1
@@ -170,21 +171,21 @@ generic_verify() {
     done
 }
 
-# Verify the output of Suricata. If a test doesn't provide its own
+# Check the output of Suricata. If a test doesn't provide its own
 # verification script, then the generic file compare will be
 # performed.
-verify() {
+check() {
     t="$1"
 
     (
        cd ${prefix}/${t}
        
-       if [ -e "verify.sh" ]; then
-           if ! ./verify.sh; then
+       if [ -e "check.sh" ]; then
+           if ! ./check.sh; then
                exit 1
            fi
        else
-           if ! generic_verify; then
+           if ! generic_check; then
                exit 1
            fi
        fi
@@ -192,8 +193,8 @@ verify() {
     return $?
 }
 
-# Run Suricata and verify the output.
-run_and_verify() {
+# Run Suricata and check the output.
+run_and_check() {
     t="${1}"
     tdir="${prefix}/${t}"
 
@@ -211,7 +212,7 @@ run_and_verify() {
        echo "===> ${t}: FAIL with non-zero exit (see ${tdir}/output/stderr)"
        return 1
     fi
-    if ! (verify "${t}"); then
+    if ! (check "${t}"); then
        echo "===> ${t}: FAIL with verification error"
        return 1
     fi
@@ -231,7 +232,7 @@ for t in ${tests}; do
            continue
        fi
        echo "===> Running ${t}."
-       if ! (run_and_verify "${t}"); then
+       if ! (run_and_check "${t}"); then
            exit 1
        fi
     fi