[libcxx-commits] [PATCH] D99532: [libcxx] Make the GDB pretty printer test less strict

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 29 12:20:39 PDT 2021

phosek created this revision.
phosek added reviewers: curdeius, ldionne.
phosek requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This is a workaround for PR48937. GDB can sometimes print additional
warnings which currently fails the test. Use re.search instead of
re.match to ignore this additional output.

  rG LLVM Github Monorepo



Index: libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
--- libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
+++ libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
@@ -49,7 +49,7 @@
             expectation_val = compare_frame.read_var("expectation")
             check_literal = expectation_val.string(encoding="utf-8")
             if "PrettyPrintToRegex" in compare_frame.name():
-                test_fails = not re.match(check_literal, value)
+                test_fails = not re.search(check_literal, value)
                 test_fails = value != check_literal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99532.333959.patch
Type: text/x-patch
Size: 657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210329/e4f2fb4e/attachment.bin>

More information about the libcxx-commits mailing list