From 546e51ee0a6eb6331b51f31bfd54857bd9600c8a Mon Sep 17 00:00:00 2001
From: Eugine Blikh <bigbes@gmail.com>
Date: Tue, 27 Aug 2013 15:03:48 +0400
Subject: [PATCH] Fix for multiple patterns in tarantool testing

---
 test/lib/tarantool_server.py | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/test/lib/tarantool_server.py b/test/lib/tarantool_server.py
index 71c48fae94..f7ba05b1d7 100644
--- a/test/lib/tarantool_server.py
+++ b/test/lib/tarantool_server.py
@@ -471,6 +471,17 @@ class TarantoolServer(Server):
                 if test.name.find(i) != -1:
                     return True
             return False
-        tests  = [PythonTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.py" )))]
-        tests += [LuaTest(k, test_suite.args, test_suite.ini)    for k in sorted(glob.glob(os.path.join(suite_path, "*.test.lua")))]
-        test_suite.tests = filter((lambda x: patterned(x, test_suite.args.tests)), tests)
+
+        for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test.py"))):
+            for test_pattern in test_suite.args.tests:
+                if test_name.find(test_pattern) != -1:
+                    test_suite.tests.append(PythonTest(test_name, test_suite.args, test_suite.ini))
+
+        for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test.lua"))):
+            for test_pattern in test_suite.args.tests:
+                if test_name.find(test_pattern) != -1:
+                    test_suite.tests.append(LuaTest(test_name, test_suite.args, test_suite.ini))
+
+#        tests  = [PythonTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.py" )))]
+#        tests += [LuaTest(k, test_suite.args, test_suite.ini)    for k in sorted(glob.glob(os.path.join(suite_path, "*.test.lua")))]
+#        test_suite.tests = filter((lambda x: patterned(x, test_suite.args.tests)), tests)
-- 
GitLab