[Lldb-commits] [lldb] r137540 - /lldb/trunk/test/dotest.py

Johnny Chen johnny.chen at apple.com
Fri Aug 12 16:55:07 PDT 2011


Author: johnny
Date: Fri Aug 12 18:55:07 2011
New Revision: 137540

URL: http://llvm.org/viewvc/llvm-project?rev=137540&view=rev
Log:
Fix a test driver bug where multiple filter specs (through the -f TestClassName.test_method_name
command line option) belonging to the same Test*.py file are ignored, except for the first one.

Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=137540&r1=137539&r2=137540&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Fri Aug 12 18:55:07 2011
@@ -717,21 +717,20 @@
                         filtered = False
                         break
 
-                # If we reach here, we have a good filterspec.  Add it.
+                # If filtered, we have a good filterspec.  Add it.
                 if filtered:
-                    break
+                    #print "adding filter spec %s to module %s" % (filterspec, module)
+                    suite.addTests(
+                        unittest2.defaultTestLoader.loadTestsFromName(filterspec, module))
+                    continue
 
             # Forgo this module if the (base, filterspec) combo is invalid
             # and no '-g' option is specified
             if filters and fs4all and not filtered:
                 continue
                 
-            # Add either the filtered test case or the entire test class.
-            if filterspec and filtered:
-                #print "adding filter spec %s to module %s" % (filterspec, module)
-                suite.addTests(
-                    unittest2.defaultTestLoader.loadTestsFromName(filterspec, module))
-            else:
+            # Add either the filtered test case(s) (which is done before) or the entire test class.
+            if not filterspec or not filtered:
                 # A simple case of just the module name.  Also the failover case
                 # from the filterspec branch when the (base, filterspec) combo
                 # doesn't make sense.





More information about the lldb-commits mailing list