aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/debian/tests
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/debian/tests')
-rw-r--r--packaging/debian/tests/control5
-rw-r--r--packaging/debian/tests/frame-count.lua17
-rwxr-xr-xpackaging/debian/tests/gui9
-rwxr-xr-xpackaging/debian/tests/tshark8
4 files changed, 39 insertions, 0 deletions
diff --git a/packaging/debian/tests/control b/packaging/debian/tests/control
new file mode 100644
index 0000000000..370caad192
--- /dev/null
+++ b/packaging/debian/tests/control
@@ -0,0 +1,5 @@
+Tests: tshark
+Depends: tshark
+
+Tests: gui
+Depends: wireshark, xvfb, xauth, at-spi2-core
diff --git a/packaging/debian/tests/frame-count.lua b/packaging/debian/tests/frame-count.lua
new file mode 100644
index 0000000000..b41b4d2050
--- /dev/null
+++ b/packaging/debian/tests/frame-count.lua
@@ -0,0 +1,17 @@
+do
+ packets = 0;
+ local function init_listener()
+ local tap = Listener.new("frame")
+ function tap.reset()
+ packets = 0;
+ end
+ function tap.packet(pinfo,tvb, ip)
+ packets = packets + 1
+ end
+ function tap.draw()
+ print("Packet count:", packets)
+ os.exit(0)
+ end
+ end
+ init_listener()
+end
diff --git a/packaging/debian/tests/gui b/packaging/debian/tests/gui
new file mode 100755
index 0000000000..38ad706dbb
--- /dev/null
+++ b/packaging/debian/tests/gui
@@ -0,0 +1,9 @@
+#!/bin/sh
+# autopkgtest check: Run wireshark GUI to see basic functionality working
+# Author: Balint Reczey <balint@balintreczey.hu>
+
+set -e
+
+xvfb-run --auto-servernum -s '-screen 0 1920x1080x24 +extension GLX' wireshark -Xlua_script:debian/tests/frame-count.lua test/captures/dhcp.pcap 2>&1
+
+echo "run: OK"
diff --git a/packaging/debian/tests/tshark b/packaging/debian/tests/tshark
new file mode 100755
index 0000000000..020574f772
--- /dev/null
+++ b/packaging/debian/tests/tshark
@@ -0,0 +1,8 @@
+#!/bin/sh
+# autopkgtest check: Run tshark to see basic functionality working
+# Author: Balint Reczey <balint@balintreczey.hu>
+
+set -e
+
+tshark --version
+echo "run: OK"