[checkmk-commits] Set correct python path to fake version for tests

Lars Michelsen lm at mathias-kettner.de
Tue Apr 11 09:50:49 CEST 2017


Module: check_mk
Branch: master
Commit: 8efca094de9486a105c1af1ad467cf088fd2c8b2
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8efca094de9486a105c1af1ad467cf088fd2c8b2

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Tue Apr 11 09:47:21 2017 +0200

Set correct python path to fake version for tests

Change-Id: I2e23c387862cc84ebb1ff74b646e989f8dbf1d50

---

 tests/testlib/__init__.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 0a0e221..139ef86 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -343,6 +343,11 @@ class Site(object):
             (self.root, self.version.version_path())) >> 8 != 0:
             raise Exception("Failed to set new version to bin/python")
 
+        if os.system("echo 'sys.path.insert(0, \"%s/lib/python\")' "
+                     "| sudo tee -a %s/share/check_mk/web/htdocs/index.py >/dev/null" %
+            (self.version.version_path(), self.version.version_path())) >> 8 != 0:
+            raise Exception("Failed to add python module path of fake version")
+
 
     def _update_with_f12_files(self):
         paths = [



More information about the checkmk-commits mailing list