Skip to content

Commit

Permalink
tests: add PVH grub2 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Nov 12, 2020
1 parent 73e55eb commit 6db24d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qubes/tests/integ/grub.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,22 @@ 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,
module=sys.modules[__name__])
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(
Expand Down

0 comments on commit 6db24d3

Please sign in to comment.