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>
This commit is contained in:
Balint Reczey 2019-03-09 22:00:33 +01:00 committed by Anders Broman
parent 4d41836db4
commit 8928460c87
4 changed files with 39 additions and 0 deletions

5
debian/tests/control vendored Normal file
View File

@ -0,0 +1,5 @@
Tests: tshark
Depends: tshark
Tests: gui
Depends: wireshark-qt, xvfb, xauth, at-spi2-core

17
debian/tests/frame-count.lua vendored Normal file
View File

@ -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

9
debian/tests/gui vendored Executable file
View File

@ -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"

8
debian/tests/tshark vendored Executable file
View File

@ -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"