diff options
author | Craig Tiller <ctiller@google.com> | 2015-07-13 11:09:21 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-07-13 11:09:21 -0700 |
commit | ce017fe6e3e34dfb3197c4996c70df458ab2accf (patch) | |
tree | 340e863263827ffe81b7acfe45d30278414c45e7 | |
parent | 4d0b7427faecfdbb1635c2ab158c922d7511b865 (diff) | |
parent | f716c0ca43bc6d9e90b109120dc827094b22b0a7 (diff) |
Merge pull request #2400 from nicolasnoble/filter-output-for-timeouts
Filtering stdout for JUnit report in case of timeouts.
-rwxr-xr-x | tools/run_tests/jobset.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index b9af169739..46137f01f4 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -209,10 +209,11 @@ class Job(object): elif self._state == _RUNNING and time.time() - self._start > 600: self._tempfile.seek(0) stdout = self._tempfile.read() + filtered_stdout = filter(lambda x: x in string.printable, stdout.decode(errors='ignore')) message('TIMEOUT', self._spec.shortname, stdout, do_newline=True) self.kill() if self._xml_test is not None: - ET.SubElement(self._xml_test, 'system-out').text = stdout + ET.SubElement(self._xml_test, 'system-out').text = filtered_stdout ET.SubElement(self._xml_test, 'error', message='Timeout') return self._state |