[libcxx-commits] [libcxx] 9ac988f - [libcxx] Make the GDB pretty printer test less strict
Petr Hosek via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 15 23:33:56 PDT 2021
Author: Petr Hosek
Date: 2021-04-15T23:33:22-07:00
New Revision: 9ac988f6a80aa1dd25594a8b4c86c0380ac99466
URL: https://github.com/llvm/llvm-project/commit/9ac988f6a80aa1dd25594a8b4c86c0380ac99466
DIFF: https://github.com/llvm/llvm-project/commit/9ac988f6a80aa1dd25594a8b4c86c0380ac99466.diff
LOG: [libcxx] Make the GDB pretty printer test less strict
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.
Differential Revision: https://reviews.llvm.org/D99532
Added:
Modified:
libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
index af473c48ea9ab..19e9a4a793bf8 100644
--- a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
+++ b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
@@ -49,7 +49,7 @@ def invoke(self, arg, from_tty):
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)
else:
test_fails = value != check_literal
More information about the libcxx-commits
mailing list