tcpreplay: add simple test.sh for all executables
authorAlexandru Ardelean <alex@shruggie.ro>
Wed, 17 Jul 2024 11:58:16 +0000 (14:58 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 23 Aug 2024 13:04:00 +0000 (16:04 +0300)
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
net/tcpreplay/test.sh [new file with mode: 0644]

diff --git a/net/tcpreplay/test.sh b/net/tcpreplay/test.sh
new file mode 100644 (file)
index 0000000..b7a8462
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+[ "$1" = "tcpreplay-all" ] || exit 0
+
+EXEC_LIST="tcpbridge tcpliveplay tcpreplay tcprewrite tcpcapinfo tcpprep tcpreplay-edit"
+
+for executable in $EXEC_LIST ; do
+       $executable --version
+       $executable --version 2>&1 | grep "$2"
+       [ $? == 0 ] || {
+               echo "Problem or incorrect version for '$executable'"
+               exit 1
+       }
+done
+