Module: check_mk
Branch: master
Commit: 67a546bcaf690b2356087322ccbeaede9c44c8a8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=67a546bcaf690b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Sep 26 11:38:10 2017 +0200
Hack to fix tests with long version paths
Change-Id: I4f453134a42b3d8151bd19c4953b50b25e10d3f6
---
tests/testlib/__init__.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 6298c5d..6a3c99d 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -407,8 +407,14 @@ class Site(object):
execute("sudo sed -i \"s|%s|%s|g\" %s/bin/omd" %
(src_version, new_version_name, self.version.version_path()))
- execute("sudo chrpath -r %s/lib %s/bin/python" %
- (self.root, self.version.version_path()))
+ # we should use self.version.version_path() in the RPATH, but that is limited to
+ # 32 bytes and our versions exceed this limit. We need to use some hack to make
+ # this possible
+ if not os.path.exists("/omd/v"):
+ execute("sudo /bin/ln -s /omd/versions /omd/v")
+
+ execute("sudo chrpath -r /omd/v/%s/lib %s/bin/python" %
+ (self.version.version_directory(), self.version.version_path()))
self._add_version_path_to_index_py()