This revision was automatically updated to reflect the committed changes.
Closed by commit rG8f121a3f18f7: [lldb] Update regex to be less fragile in 
TestDataFormatterGenericUnordered (authored by kastiglione).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133395/new/

https://reviews.llvm.org/D133395

Files:
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py


Index: 
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py
===================================================================
--- 
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py
+++ 
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py
@@ -36,6 +36,9 @@
             self.runCmd(
                 "settings set target.max-children-count 256",
                 check=False)
+            self.runCmd(
+                'settings set auto-one-line-summaries true',
+                check=False)
 
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
@@ -47,16 +50,19 @@
             "corrupt_map", ['%s::unordered_map' %
                     ns, 'size=0 {}'])
 
-        must_not_contain__cc = r'(?s)^(?!.*\b__cc = )'
+        # Ensure key/value children, not wrapped in a layer.
+        # This regex depends on auto-one-line-summaries.
+        self.runCmd('settings set auto-one-line-summaries false')
+        children_are_key_value = r'\[0\] = \{\s*first = '
 
         self.look_for_content_and_continue(
             "map", ['%s::unordered_map' % ns,
-                    must_not_contain__cc,
+                    children_are_key_value,
                     'size=5 {', 'hello', 'world', 'this', 'is', 'me'])
 
         self.look_for_content_and_continue(
             "mmap", ['%s::unordered_multimap' % ns,
-                     must_not_contain__cc,
+                     children_are_key_value,
                      'size=6 {', 'first = 3', 'second = "this"',
                      'first = 2', 'second = "hello"'])
 


Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py
===================================================================
--- lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py
+++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py
@@ -36,6 +36,9 @@
             self.runCmd(
                 "settings set target.max-children-count 256",
                 check=False)
+            self.runCmd(
+                'settings set auto-one-line-summaries true',
+                check=False)
 
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
@@ -47,16 +50,19 @@
             "corrupt_map", ['%s::unordered_map' %
                     ns, 'size=0 {}'])
 
-        must_not_contain__cc = r'(?s)^(?!.*\b__cc = )'
+        # Ensure key/value children, not wrapped in a layer.
+        # This regex depends on auto-one-line-summaries.
+        self.runCmd('settings set auto-one-line-summaries false')
+        children_are_key_value = r'\[0\] = \{\s*first = '
 
         self.look_for_content_and_continue(
             "map", ['%s::unordered_map' % ns,
-                    must_not_contain__cc,
+                    children_are_key_value,
                     'size=5 {', 'hello', 'world', 'this', 'is', 'me'])
 
         self.look_for_content_and_continue(
             "mmap", ['%s::unordered_multimap' % ns,
-                     must_not_contain__cc,
+                     children_are_key_value,
                      'size=6 {', 'first = 3', 'second = "this"',
                      'first = 2', 'second = "hello"'])
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to