diff options
author | Balint Reczey <balint.reczey@canonical.com> | 2019-03-09 22:00:33 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-07-24 09:40:55 +0000 |
commit | 8928460c877d25220026b209ba522e36997de344 (patch) | |
tree | 504e39b8a0c5d9d975064f0e3c42ee757c666717 /debian | |
parent | 4d41836db429930c3313f0beb3a7a06ae7238680 (diff) |
debian: Add autopkgtest for testing starting GUI and CLI
Incorporates debian/tests/ changes up to upstream/3.0.0-76-ge634555b61:
* Add autopkgtest for testing starting GUI
* Add missing autopkgtest dependencies
* Use automatic xvfb server number in tests
* Use GLX extension in autopkgtest, Qt needs it
* Install at-spi2-core in gui autopkgtest to avoid error messages
* debian/test/gui: Ignore stderr from wireshark-gtk since upstream deprecated it
* debian/tests/gui: Redirect stderr to stdout because Lua prints to stderr
* Stop shipping Wireshark's GTK+ GUI
Change-Id: I840fa17fb5ac2bc7b4fed36c4286ea97742f7369
Reviewed-on: https://code.wireshark.org/review/28519
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'debian')
-rw-r--r-- | debian/tests/control | 5 | ||||
-rw-r--r-- | debian/tests/frame-count.lua | 17 | ||||
-rwxr-xr-x | debian/tests/gui | 9 | ||||
-rwxr-xr-x | debian/tests/tshark | 8 |
4 files changed, 39 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000000..889d49c9fe --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,5 @@ +Tests: tshark +Depends: tshark + +Tests: gui +Depends: wireshark-qt, xvfb, xauth, at-spi2-core diff --git a/debian/tests/frame-count.lua b/debian/tests/frame-count.lua new file mode 100644 index 0000000000..b41b4d2050 --- /dev/null +++ b/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/debian/tests/gui b/debian/tests/gui new file mode 100755 index 0000000000..38ad706dbb --- /dev/null +++ b/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/debian/tests/tshark b/debian/tests/tshark new file mode 100755 index 0000000000..020574f772 --- /dev/null +++ b/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" |