]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Allow more strings in filters
authorWarren Usui <warren.usui@inktank.com>
Wed, 29 Oct 2014 00:27:21 +0000 (17:27 -0700)
committerWarren Usui <warren.usui@inktank.com>
Wed, 29 Oct 2014 02:57:51 +0000 (19:57 -0700)
A comma separated list can now be used in filter and filter-out.

Fixes: #9925
Signed-off-by: Warren Usui <warren.usui@inktank.com>
teuthology/suite.py

index b0b3519dc390879527c64daf2923d685208bcbef..ba3ffda8def91a5eddaba0328edb66146f290c8e 100644 (file)
@@ -449,13 +449,25 @@ def schedule_suite(job_config,
                     limit=limit))
             break
         if filter_in:
-            if filter_in not in description:
-                if all([x.find(filter_in) < 0 for x in fragment_paths]):
+            filter_list = [x.strip() for x in filter_in.split(',')]
+            if not any([x in description for x in filter_list]):
+                all_filt = []
+                for filt_samp in filter_list:
+                    all_filt.extend([x.find(filt_samp) < 0 for x in fragment_paths])
+                if all(all_filt):
                     continue
         if filter_out:
-            if filter_out in description or any([filter_out in z for z in
-                                                 fragment_paths]):
+            filter_list = [x.strip() for x in filter_out.split(',')]
+            if any([x in description for x in filter_list]):
                 continue
+            all_filt_val = False
+            for filt_samp in filter_list:
+                flist = [filt_samp in x for x in fragment_paths]
+                if any(flist):
+                    all_filt_val = True
+                    continue
+            if all_filt_val:
+                continue        
 
         raw_yaml = '\n'.join([file(a, 'r').read() for a in fragment_paths])