Module: check_mk
Branch: master
Commit: 08bda9c7b637a31e051d790c7c81a2dec329bd4f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=08bda9c7b637a3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 11 14:51:28 2019 +0100
Only copy new modules to site for running integration tests
Change-Id: I5b50125754bf2f6f80a19d1d2437825cfee1a49c
---
tests/testlib/__init__.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index c9a2c2c..bcff23c 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -731,12 +731,11 @@ class Site(object):
packages_dir = venv / "lib/python2.7/site-packages"
for file_name in os.listdir(str(packages_dir)):
- if file_name == "kubernetes":
+ # Only copy modules that do not exist in regular module path
+ if os.path.exists("%s/lib/python/%s" % (self.root, file_name)) \
+ or os.path.exists("%s/lib/python2.7/site-packages/%s" %
(self.root, file_name)):
continue
- #if "cffi" in file_name:
- # continue
-
assert os.system("sudo rsync -a --chown %s:%s %s
%s/local/lib/python/" % # nosec
(self.id, self.id, packages_dir / file_name, self.root))
>> 8 == 0