aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-02-26 11:17:41 -0800
committerGerald Combs <gerald@wireshark.org>2020-02-26 21:54:57 +0000
commitf8f6ce55defa4b0a69509564deecb31259fc1e74 (patch)
treeb20a731a7e4af440ea0842f2b1ec82bdb262e606 /test
parent574aa22870067054667a09c2fc36b3fa4495cb92 (diff)
Test: Make sure we can run Wireshark on macOS.
Run Wireshark tests on macOS only if SECURITYSESSIONID. If this isn't reliable enough we might be able to get away with running a small UI utility, e.g. `pbpaste > /dev/null`. Change-Id: Ieccb87bcc1312f02c22ec2905a80437bf136d964 Reviewed-on: https://code.wireshark.org/review/36195 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'test')
-rw-r--r--test/fixtures_ws.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/fixtures_ws.py b/test/fixtures_ws.py
index 8305b2db18..e00e65bd49 100644
--- a/test/fixtures_ws.py
+++ b/test/fixtures_ws.py
@@ -137,11 +137,13 @@ def cmd_wireshark(program):
@fixtures.fixture(scope='session')
def wireshark_command(cmd_wireshark):
- # Windows and macOS can always display the GUI. On Linux, headless mode is
- # used, see QT_QPA_PLATFORM in the 'test_env' fixture.
+ # Windows can always display the GUI and macOS can if we're in a login session.
+ # On Linux, headless mode is used, see QT_QPA_PLATFORM in the 'test_env' fixture.
+ if sys.platform == 'darwin' and 'SECURITYSESSIONID' not in os.environ:
+ fixtures.skip('Wireshark GUI tests require loginwindow session')
if sys.platform not in ('win32', 'darwin', 'linux'):
if 'DISPLAY' not in os.environ:
- fixtures.skip('Wireshark GUI tests requires DISPLAY')
+ fixtures.skip('Wireshark GUI tests require DISPLAY')
return (cmd_wireshark, '-ogui.update.enabled:FALSE')