summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChris Gunn <chrisgun@microsoft.com>2022-02-10 16:49:06 -0800
committerDaniel P. Berrangé <berrange@redhat.com>2022-06-08 16:43:52 +0100
commitb9f79758c973db088b5c687425c6613796fdb250 (patch)
treea035a7ef7a36bdc5f94d98dfc56a3f7e5f0d1b34 /setup.py
parentc2fae558c363c253a0356fafceb73f5b13b5f0f3 (diff)
downloadlibvirt-python-b9f79758c973db088b5c687425c6613796fdb250.tar.gz
tests: add libvirtaio test coverage
Signed-off-by: Chris Gunn <chrisgun@microsoft.com>
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 0bb60e1..3e99ac4 100755
--- a/setup.py
+++ b/setup.py
@@ -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):