summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2021-04-09 15:33:32 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2021-04-09 16:40:42 +0100
commit38bb83e91427756dbc4bc37c52a465e9e360030c (patch)
treeb4e516e6521051b0e9721d345cfe69b2a235843a /setup.py
parent32a925a6d08764a873f481a3f19c0c73ea723c1e (diff)
downloadlibvirt-python-38bb83e91427756dbc4bc37c52a465e9e360030c.tar.gz
Don't run sanity checks by default
The sanity check scripts verify that the binding covers all APIs in the libvirt library/headers being built against. This is primarily there for libvirt maintainers to identify when there are gaps in API coverage. This is not something downstream consumers of libvirt-python should be running themselves, so we shouldn't added it to tests by default. In addition if people are working on branches or submitting merge requests for python changes, we shouldn't block their work for failed API coverage sanity tests, if the python binding otherwise builds fine and passes regular unit tests. Thus, we introduce a new gitlab job "api-coverage" with some conditions: - If pushing to a branch, the job is treated as non-fatal - For regular scheduled builds, it is mandatory - Don't run in any other scenarios This job uses the artifacts from the centos-8-git-build job and re-runs the test suite, requesting the sanity tests to be run too. This will achieve the result of letting us see missing API coverage in nightly builds, without blocking other contributions. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index af81968..6d0bd43 100755
--- a/setup.py
+++ b/setup.py
@@ -313,7 +313,9 @@ class my_test(Command):
os.environ["PYTHONPATH"] = self.build_platlib + ":" + os.environ["PYTHONPATH"]
else:
os.environ["PYTHONPATH"] = self.build_platlib
- self.spawn([sys.executable, "sanitytest.py", self.build_platlib, apis[0]])
+
+ if "LIBVIRT_API_COVERAGE" in os.environ:
+ self.spawn([sys.executable, "sanitytest.py", self.build_platlib, apis[0]])
pytest = self.find_pytest_path()
self.spawn([sys.executable, pytest])