tests: add PVH grub2 tests

This commit is contained in:
Marek Marczykowski-Górecki 2020-11-11 05:57:49 +01:00
parent 73e55eb99a
commit 6db24d3eaf
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -158,6 +158,12 @@ class TC_41_HVMGrub(GrubBase):
virt_mode = 'hvm'
kernel = None
@unittest.skipUnless(os.path.exists('/var/lib/qubes/vm-kernels/pvgrub2-pvh'),
'grub2-xen-pvh package not installed')
class TC_42_PVHGrub(GrubBase):
virt_mode = 'pvh'
kernel = 'pvgrub2-pvh'
def create_testcases_for_templates():
yield from qubes.tests.create_testcases_for_templates('TC_40_PVGrub',
TC_40_PVGrub, qubes.tests.SystemTestCase,
@ -165,6 +171,9 @@ def create_testcases_for_templates():
yield from qubes.tests.create_testcases_for_templates('TC_41_HVMGrub',
TC_41_HVMGrub, qubes.tests.SystemTestCase,
module=sys.modules[__name__])
yield from qubes.tests.create_testcases_for_templates('TC_42_PVHGrub',
TC_42_PVHGrub, qubes.tests.SystemTestCase,
module=sys.modules[__name__])
def load_tests(loader, tests, pattern):
tests.addTests(loader.loadTestsFromNames(