summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2023-03-28 06:25:11 -0400
committerDaniel P. Berrangé <berrange@redhat.com>2023-04-19 08:17:16 -0400
commit65214dcd96301ea15c933484c803b0aef36d68d0 (patch)
treef90ec251bb09813a2772f1e69fe7818ca2158a4e
parent62a4c1f395eebb3d693df35514eabd6580bd0bdb (diff)
downloadlibvirt-python-65214dcd96301ea15c933484c803b0aef36d68d0.tar.gz
setup: limit pytest to 'tests' subdir
The libvirt git repo contains test data that represents the layout of files in sysfs, which has two subdirs that mutually reference each other with symlinks. When pytest does test discovery it will traverse every directory it finds underneath the libvirt-python checkout. Since we checkout libvirt as a sub-dir, pytest traverses everything in libvirt git and gets stuck in an infinite loop following symlinks in the libvirt test data. Telling pytest to only look at the 'tests' subdir avoids this extra traversal. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
-rwxr-xr-xsetup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 196f930..827be16 100755
--- a/setup.py
+++ b/setup.py
@@ -310,7 +310,7 @@ class my_test(Command):
os.environ["PYTHONPATH"] = self.build_platlib
pytest = self.find_pytest_path()
- subprocess.check_call([pytest])
+ subprocess.check_call([pytest, "tests"])
class my_clean(Command):
user_options = [