1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-08-01 00:21:59 +03:00

tests: add libvirtaio test coverage

Signed-off-by: Chris Gunn <chrisgun@microsoft.com>
This commit is contained in:
Chris Gunn
2022-02-10 16:49:06 -08:00
committed by Daniel P. Berrangé
parent c2fae558c3
commit b9f79758c9
3 changed files with 129 additions and 1 deletions

View File

@ -310,8 +310,19 @@ class my_test(Command):
os.environ["PYTHONPATH"] = self.build_platlib
pytest = self.find_pytest_path()
subprocess.check_call([pytest])
# Run the normal tests.
subprocess.check_call([pytest, "-m", "not separate_process"])
# Run the tests that require their own process.
testlist = subprocess.run(
[pytest, "--collect-only", "--quiet", "-m", "separate_process"],
check=True, stdout=subprocess.PIPE)
testlist = testlist.stdout.decode("utf-8").splitlines()
testlist = filter(
lambda test: test and "tests collected" not in test, testlist)
for test in testlist:
subprocess.check_call([pytest, test])
class my_clean(Command):
def run(self):