1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-11-24 08:23:46 +03:00

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>
This commit is contained in:
Daniel P. Berrangé
2023-03-28 06:25:11 -04:00
parent 62a4c1f395
commit 65214dcd96

View File

@@ -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 = [