[CRIU] [RFC PATCHv2 07/32] zdtm: zdtm.py: properly handle 'crlib' in group tests

Ivan Shapovalov intelfx at intelfx.name
Sat Mar 12 00:42:06 PST 2016


Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
 test/zdtm.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index 79ffcd1..bdf50b2 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -395,7 +395,10 @@ class zdtm_test:
 		if self.__flavor.ns:
 			opts += ["--root", self.__flavor.root]
 		if test_flag(self.__desc, 'crlib'):
-			opts += ["-L", os.path.dirname(os.path.realpath(self.__name)) + '/lib']
+			for test in self._bins:
+				lib = os.path.dirname(os.path.realpath(test)) + '/lib'
+				if os.path.isdir(lib):
+					opts += ["-L", lib]
 		return opts
 
 	def getdopts(self):
-- 
2.7.2



More information about the CRIU mailing list