test: fix extcap_name fixture and skip test.

dpauxmon relies on libnl that is linux specific. Skip the test
for other platforms.
Fix skip message while here.

Change-Id: I744d83d0a56e41e1c32e45ade8ca0d9dd29876e1
Reviewed-on: https://code.wireshark.org/review/35525
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Dario Lombardo 2019-12-20 16:07:45 +01:00 committed by Peter Wu
parent 746335804b
commit 69c0a10400
2 changed files with 7 additions and 4 deletions

View File

@ -148,7 +148,10 @@ def wireshark_command(cmd_wireshark):
@fixtures.fixture(scope='session')
def cmd_extcap(program):
def extcap_name(name):
return program(os.path.join('extcap', name))
if sys.platform == 'darwin':
return program(os.path.join('Wireshark.app/Contents/MacOS/extcap', name))
else:
return program(os.path.join('extcap', name))
return extcap_name

View File

@ -65,8 +65,8 @@ class case_extcaps(subprocesstest.SubprocessTestCase):
def test_dpauxmon(self, check_extcap_execution):
''' extcap interface tests for dpauxmon '''
if sys.platform == 'win32':
fixtures.skip('dpauxmon not available on Windows')
if not sys.platform.startswith('linux'):
fixtures.skip('dpauxmon available on Linux only')
check_extcap_execution("dpauxmon")
def test_randpktdump(self, check_extcap_execution):
@ -76,7 +76,7 @@ class case_extcaps(subprocesstest.SubprocessTestCase):
def test_sdjournal(self, check_extcap_execution):
''' extcap interface tests for sdjournal '''
if not sys.platform.startswith('linux'):
fixtures.skip('sdjournal available on Linux only')
fixtures.skip('sdjournal is available on Linux only')
check_extcap_execution("sdjournal")
def test_sshdump(self, check_extcap_execution):