[lldb] Improve assert message in TestCPPAccelerator

`log` is just some IO object that gets printed as `<_io.TextIOWrapper = filename`
but the intention here was to print the actual found log contents.
This commit is contained in:
Raphael Isemann 2021-10-20 12:02:49 +02:00
parent 551d118805
commit 956df6fa62
1 changed files with 3 additions and 2 deletions

View File

@ -23,11 +23,12 @@ class CPPAcceleratorTableTestCase(TestBase):
# of it not being in the first file looked at.
self.expect('frame variable inner_d')
log = open(logfile, 'r')
with open(logfile) as f:
log = f.readlines()
n = 0
for line in log:
if re.findall(r'[abcdefg]\.o: FindByNameAndTag\(\)', line):
self.assertIn("d.o", line)
n += 1
self.assertEqual(n, 1, log)
self.assertEqual(n, 1, "".join(log))