mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qemu-iotests: Add iotests.supports_quorum()
There's many tests that need Quorum support in order to run. At the moment each test implements its own check to see if Quorum is enabled. This patch centralizes all those checks in a new function called iotests.supports_quorum(). Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
704d59f13d
commit
b0f904950c
3 changed files with 18 additions and 17 deletions
|
@ -348,9 +348,12 @@ def verify_platform(supported_oses=['linux']):
|
|||
if True not in [sys.platform.startswith(x) for x in supported_oses]:
|
||||
notrun('not suitable for this OS: %s' % sys.platform)
|
||||
|
||||
def supports_quorum():
|
||||
return 'quorum' in qemu_img_pipe('--help')
|
||||
|
||||
def verify_quorum():
|
||||
'''Skip test suite if quorum support is not available'''
|
||||
if 'quorum' not in qemu_img_pipe('--help'):
|
||||
if not supports_quorum():
|
||||
notrun('quorum support missing')
|
||||
|
||||
def main(supported_fmts=[], supported_oses=['linux']):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue