tests: skip system tests if not in dom0

This commit is contained in:
Marek Marczykowski-Górecki 2016-02-10 19:45:44 +01:00 committed by Wojtek Porczyk
parent 50819c726c
commit 81dbe3628f

View File

@ -371,6 +371,8 @@ class SystemTestsMixin(object):
""" """
# noinspection PyAttributeOutsideInit # noinspection PyAttributeOutsideInit
def setUp(self): def setUp(self):
if not in_dom0:
self.skipTest('outside dom0')
super(SystemTestsMixin, self).setUp() super(SystemTestsMixin, self).setUp()
self.remove_test_vms() self.remove_test_vms()
@ -423,6 +425,8 @@ class SystemTestsMixin(object):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
super(SystemTestsMixin, cls).tearDownClass() super(SystemTestsMixin, cls).tearDownClass()
if not in_dom0:
return
cls.remove_test_vms(xmlpath=CLASS_XMLPATH, prefix=CLSVMPREFIX) cls.remove_test_vms(xmlpath=CLASS_XMLPATH, prefix=CLSVMPREFIX)
@staticmethod @staticmethod