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

diff --git a/tests/lmp-v.sh b/tests/lmp-v.sh
deleted file mode 100755 (executable)
index cdcea20..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# The "verbose" Link Management Protocol test involves a float calculation that
-# may produce a slightly different result depending on the architecture and the
-# compiler (see GitHub issue #333). The reference output was produced using a
-# GCC build and must reproduce correctly on any other GCC build regardless of
-# the architecture.
-
-#
-# Get the tests directory from $0.
-#
-testsdir=`dirname "$0"`
-
-exitcode=0
-
-# A Windows build may have no file named Makefile and also a version of grep
-# that won't return an error when the file does not exist. Work around.
-if [ ! -f ../Makefile ]
-then
-       printf '    %-40s: TEST SKIPPED (no Makefile)\n' 'lmp-v'
-elif grep '^CC = .*gcc' ../Makefile >/dev/null
-then
-       passed=`cat .passed`
-       failed=`cat .failed`
-       if ${testsdir}/TESTonce lmp-v ${testsdir}/lmp.pcap ${testsdir}/lmp-v.out '-T lmp -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' 'lmp-v'
-fi
-
-exit $exitcode
diff --git a/tests/lmp-v.tests b/tests/lmp-v.tests
new file mode 100644 (file)
index 0000000..5fa34a7
--- /dev/null
@@ -0,0 +1,13 @@
+# -*- perl -*-
+
+$testlist = [
+    {
+        config_set => 'USING_GCC',
+        name => 'lmp-v',
+        input => 'lmp.pcap',
+        output => 'lmp-v.out',
+        args   => '-T lmp -v'
+    },
+    ];
+
+1;