From cd803b154737cbdfddbc7805f612dae4bac94ed4 Mon Sep 17 00:00:00 2001 From: machenbach Date: Tue, 2 Feb 2016 05:58:32 -0800 Subject: [PATCH] [test] Make missing files result in a proper test runner error. BUG= Review URL: https://codereview.chromium.org/1652003002 Cr-Commit-Position: refs/heads/master@{#33684} --- tools/testrunner/local/pool.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/testrunner/local/pool.py b/tools/testrunner/local/pool.py index 6d123fd4e5..99996ee3ce 100644 --- a/tools/testrunner/local/pool.py +++ b/tools/testrunner/local/pool.py @@ -109,6 +109,7 @@ class Pool(): process boundary. """ try: + internal_error = False gen = iter(gen) self.advance = self._advance_more @@ -134,7 +135,9 @@ class Pool(): yield MaybeResult.create_heartbeat() self.count -= 1 if result.exception: - # Ignore items with unexpected exceptions. + # TODO(machenbach): Handle a few known types of internal errors + # gracefully, e.g. missing test files. + internal_error = True continue elif result.break_now: # A keyboard interrupt happened in one of the worker processes. @@ -144,6 +147,8 @@ class Pool(): self.advance(gen) finally: self.terminate() + if internal_error: + raise Exception("Internal error in a worker process.") def _advance_more(self, gen): while self.count < self.num_workers * self.BUFFER_FACTOR: