]> The Tcpdump Group git mirrors - tcpdump/commitdiff
switch from shell script to complex test
authorMichael Richardson <[email protected]>
Mon, 3 Feb 2020 02:52:40 +0000 (03:52 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 4 Feb 2020 22:19:17 +0000 (22:19 +0000)
tests/isis-seg-fault-1-v.sh [deleted file]
tests/isis-seg-fault-1-v.tests [new file with mode: 0644]

diff --git a/tests/isis-seg-fault-1-v.sh b/tests/isis-seg-fault-1-v.sh
deleted file mode 100755 (executable)
index 970afad..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-# This "verbose" ISIS protocol test involves a float calculation that
-# may produce a slightly different result if the compiler is not GCC.
-# Test only with GCC (similar to GitHub issue #333).
-
-#
-# Get the tests directory from $0.
-#
-testsdir=`dirname "$0"`
-
-exitcode=0
-test_name=isis-seg-fault-1-v
-
-if [ ! -f ../Makefile ]
-then
-       printf '    %-40s: TEST SKIPPED (no Makefile)\n' $test_name
-elif grep '^CC = .*gcc' ../Makefile >/dev/null
-then
-       passed=`cat .passed`
-       failed=`cat .failed`
-       if ${testsdir}/TESTonce $test_name ${testsdir}/isis-seg-fault-1.pcapng ${testsdir}/isis-seg-fault-1-v.out '-v'
-       then
-               passed=`expr $passed + 1`
-               echo $passed >.passed
-       else
-               failed=`expr $failed + 1`
-               echo $failed >.failed
-               exitcode=1
-       fi
-else
-       printf '    %-40s: TEST SKIPPED (compiler is not GCC)\n' $test_name
-fi
-
-exit $exitcode
diff --git a/tests/isis-seg-fault-1-v.tests b/tests/isis-seg-fault-1-v.tests
new file mode 100644 (file)
index 0000000..b19d6da
--- /dev/null
@@ -0,0 +1,13 @@
+# -*- perl -*-
+
+$testlist = [
+    {
+        config_set => 'USING_GCC',
+        name => 'isis-seg-fault-1-v',
+        input => 'isis-seg-fault-1.pcapng',
+        output => 'isis-seg-fault-1-v.out',
+        args   => '-v'
+    },
+    ];
+
+1;