From 65214dcd96301ea15c933484c803b0aef36d68d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 28 Mar 2023 06:25:11 -0400 Subject: setup: limit pytest to 'tests' subdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = [ -- cgit v1.2.1