-wireshark_gtk_capture_suite() {
- if [ ! -x "$WIRESHARK_GTK" ]; then
- echo -n ' (no GTK support)'
- test_step_skipped
- return
- fi
-
- # k: start capture immediately
- # WIRESHARK_QUIT_AFTER_CAPTURE needs to be set.
-
- #
- # NOTE: if, on macOS, 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_GTK_CMD"
- test_step_add "Capture 10 packets" capture_step_10packets
- # piping to stdout doesn't work with Wireshark and capturing!
- #test_step_add "Capture 10 packets using stdout: -w -" capture_step_10packets_stdout
- if [ $TEST_FIFO ]; then
- test_step_add "Capture via fifo" capture_step_fifo
- fi
- test_step_add "Capture via stdin" capture_step_stdin
- # read filter doesn't work with Wireshark and capturing!
- #test_step_add "Capture read filter (${TRAFFIC_CAPTURE_DURATION}s)" capture_step_read_filter
- test_step_add "Capture snapshot length 68 bytes (${TRAFFIC_CAPTURE_DURATION}s)" capture_step_snapshot
-}
-