Bug 1262331 - Fix mach valgrind-test logging
Valgrind-test's output handler buffers valgrind's output to detect
errors and emit proper messages that are detected by automation log
parsing. When an error is detected, the buffered output is reinjected,
but there was a typo that prevented that from actually happening,
which ate the first lines of stack traces.
--- a/build/valgrind/output_handler.py
+++ b/build/valgrind/output_handler.py
@@ -101,16 +101,16 @@ class OutputHandler(object):
else:
# We've finished getting the first few stack entries. Print the
# failure message and the buffered lines, and then reset state.
self.logger(logging.ERROR, 'valgrind-error-msg',
{'error': self.curr_error,
'location': self.curr_location},
'TEST-UNEXPECTED-FAIL | valgrind-test | {error} at {location}')
for b in self.buffered_lines:
- self.log(line)
+ self.log(b)
self.curr_error = None
self.curr_location = None
self.buffered_lines = None
if re.match(self.re_suppression, line):
self.suppression_count += 1