From 9ac988f6a80aa1dd25594a8b4c86c0380ac99466 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 29 Mar 2021 12:10:18 -0700 Subject: [PATCH] [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 --- libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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