OSDN Git Service

Revert "[lldb/Test] Make substrs argument to self.expect ordered."
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 31 Jan 2020 21:48:02 +0000 (13:48 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 31 Jan 2020 21:50:39 +0000 (13:50 -0800)
Temporarily revert to fix the tests that only fail on the bots because
of the newly enforced substr order.

lldb/packages/Python/lldbsuite/test/lldbtest.py

index 933a99d..602749c 100644 (file)
@@ -2341,11 +2341,8 @@ FileCheck output:
         # Look for sub strings, if specified.
         keepgoing = matched if matching else not matched
         if substrs and keepgoing:
-            start = 0
             for substr in substrs:
-                index = output[start:].find(substr)
-                start = start + index if matching else 0
-                matched = index != -1
+                matched = output.find(substr) != -1
                 with recording(self, trace) as sbuf:
                     print("%s sub string: %s" % (heading, substr), file=sbuf)
                     print("Matched" if matched else "Not matched", file=sbuf)