Skip to content

Commit

Permalink
[libcxx] Make the GDB pretty printer test less strict
Browse files Browse the repository at this point in the history
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
  • Loading branch information
petrhosek committed Apr 16, 2021
1 parent 4170d6c commit 9ac988f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
Expand Up @@ -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

Expand Down

0 comments on commit 9ac988f

Please sign in to comment.