aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-09-22 21:51:05 +0000
committerGuy Harris <guy@alum.mit.edu>2013-09-22 21:51:05 +0000
commit800b45f0a988dcd694b771396fcbd617075d3493 (patch)
treeeb843d42c75e31de17eb40ff907a7180870d0927 /test
parentd158983d7e246ef47035143878f7614d181cb794 (diff)
From Peter Wu: on systems other than Windows, skip the GUI tests if the
DISPLAY environment variable isn't set. From me: note that this won't be the right thing to do on OS X if we switch to a toolkit that doesn't use X11, and that this may or may not be the right thing to do with toolkits using Wayland or Mir directly. svn path=/trunk/; revision=52182
Diffstat (limited to 'test')
-rw-r--r--test/README.test4
-rwxr-xr-xtest/suite-capture.sh17
2 files changed, 20 insertions, 1 deletions
diff --git a/test/README.test b/test/README.test
index 10411dbb4d..a3bb51076f 100644
--- a/test/README.test
+++ b/test/README.test
@@ -41,7 +41,9 @@ What you'll need (to do):
- have tput (e.g. in the cygwin ncurses package)
- you'll need a network interface with some network traffic
(so you can run the capture tests)
-
+ - (for non-Windows platforms) An X server for running the capture tests with
+ the graphical Wireshark program.
+
A Test Ride
-----------
diff --git a/test/suite-capture.sh b/test/suite-capture.sh
index 1a7b4f2bdf..773b73b039 100755
--- a/test/suite-capture.sh
+++ b/test/suite-capture.sh
@@ -413,6 +413,23 @@ capture_step_snapshot() {
wireshark_capture_suite() {
# k: start capture immediately
# WIRESHARK_QUIT_AFTER_CAPTURE needs to be set.
+
+ #
+ # NOTE: if, on OS X, we start using a native-Quartz toolkit,
+ # this would need to change to check for WS_SYSTEM being
+ # "Darwin" and, if it is, check whether the standard output
+ # of "launchctl managername" is "Aqua".
+ #
+ # This may not do the right thing if we use toolkits that
+ # use Wayland or Mir directly, unless they also depend on
+ # the DISPLAY environment variable.
+ #
+ if [[ $WS_SYSTEM != Windows ]] && [ -z "$DISPLAY" ]; then
+ echo -n ' (X server not available)'
+ test_step_skipped
+ return
+ fi
+
DUT="$WIRESHARK_CMD"
test_step_add "Capture 10 packets" capture_step_10packets
# piping to stdout doesn't work with Wireshark and capturing!