Parse gtest logs even on main test failure/exception.
Wrap the parse action in a finally block so the logs from a gtest run will still be parsed even when the main test fails and throws an exception that terminates the test run.
BUG=None.
TEST=Ran the parser on the log file from the failed sync test run.
Change-Id: Ic4f5be02eaaae7aa8a9131435df21cd0e219b6eb
Reviewed-on: http://gerrit.chromium.org/gerrit/1049
Tested-by: Dale Curtis <[email protected]>
Reviewed-by: Dale Curtis <[email protected]>
diff --git a/server/gtest_runner.py b/server/gtest_runner.py
index 42955e8..c78f66c 100644
--- a/server/gtest_runner.py
+++ b/server/gtest_runner.py
@@ -53,8 +53,10 @@
if self._gtest.validate(attribute_set):
logging.info('%s %s Running %s', self._host,
[a for a in attribute_set], self._gtest)
- self._gtest.run_test(client_autotest, self._results_dir)
- self.parse()
+ try:
+ self._gtest.run_test(client_autotest, self._results_dir)
+ finally:
+ self.parse()
else:
self.record_failed_test(self._gtest.test_name,
'No machines found for: ' + self._gtest)