Skip to content

Commit

Permalink
Get the list of dom0 tests from the metadata file
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Verschelde <[email protected]>
  • Loading branch information
stormi committed Feb 21, 2024
1 parent c37b15e commit c0d740c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/xen/test_xen_dom0_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import json
import pytest

# Requirements:
Expand All @@ -7,10 +8,10 @@

@pytest.mark.usefixtures("host_with_dom0_tests")
class TestXenDom0Tests:
def test_cpu_policy(self, host):
logging.info("Running test-cpu-policy...")
host.ssh(['/usr/libexec/xen/bin/test-cpu-policy'])

def test_xenstore(self, host):
logging.info("Running test-xenstore...")
host.ssh(['/usr/libexec/xen/bin/test-xenstore'])
def test_dom0(self, host):
metadata = host.ssh(['cat', '/usr/share/xen-dom0-tests-metadata.json'])
tests = json.loads(metadata)["tests"]
assert tests, "Test list must not be empty"
for test in tests:
logging.info(f"Running {test}...")
host.ssh([f'/usr/libexec/xen/bin/{test}'])

0 comments on commit c0d740c

Please sign in to comment.