Bug 1262331 - Fix mach valgrind-test logging draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 06 Apr 2016 11:01:56 +0900
changeset 347887 ab12cf17a1c7057af6313edb02e4882e52baab3e
parent 347886 06029a4d4a7d95d2bd3c2a0c42dc1705e4e9adf6
child 517734 81267468a4452cd053ef990b02aa61871d90fa00
push id14696
push userbmo:mh+mozilla@glandium.org
push dateWed, 06 Apr 2016 02:07:39 +0000
bugs1262331
milestone48.0a1
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.
build/valgrind/output_handler.py
--- 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