forked from osmocom/wireshark
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>
This commit is contained in:
parent
574aa22870
commit
f8f6ce55de
|
@ -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')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue