[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
This commit is contained in:
Petr Hosek 2021-03-29 12:10:18 -07:00
parent 4170d6cdd5
commit 9ac988f6a8
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class CheckResult(gdb.Command):
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