Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3446)

Unified Diff: scripts/slave/recipe_modules/v8/testing.py

Issue 2246503002: V8: Make sure infra failures fail overall build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/v8.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/v8/testing.py
diff --git a/scripts/slave/recipe_modules/v8/testing.py b/scripts/slave/recipe_modules/v8/testing.py
index a62445b4774a6d57ec62643ce217b76c0f97a724..a2e6ec824aa243915e34f2a401bba524ea48b66e 100644
--- a/scripts/slave/recipe_modules/v8/testing.py
+++ b/scripts/slave/recipe_modules/v8/testing.py
@@ -498,6 +498,7 @@ class V8SwarmingTest(V8Test):
script=self.v8.resource('collect_v8_task.py'),
args=args,
allow_subannotations=True,
+ infra_step=True,
step_test_data=kwargs.pop('step_test_data', None),
**kwargs)
@@ -548,17 +549,18 @@ class V8SwarmingTest(V8Test):
# TODO(machenbach): Soften this when softening 'assert isolated_hash'
# above.
assert self.task
+ result = TestResults.empty()
try:
# Collect swarming results. Use the same test simulation data for the
# swarming collect step like for local testing.
- result = self.api.swarming.collect_task(
+ self.api.swarming.collect_task(
self.task,
step_test_data=lambda: self.v8.test_api.output_json(),
)
- finally:
- # Note: Exceptions from post_run might hide a pending exception from the
- # try block.
- return self.post_run(self.test, coverage_context)
+ except self.api.step.InfraFailure as e:
+ result += TestResults.infra_failure(e)
+
+ return result + self.post_run(self.test, coverage_context)
def rerun(self, failure_dict, **kwargs):
self.pre_run(test=self._setup_rerun_config(failure_dict), **kwargs)
@@ -764,6 +766,10 @@ class TestResults(object):
def empty():
return TestResults([], [], [])
+ @staticmethod
+ def infra_failure(exception):
+ return TestResults([], [], [exception])
+
@property
def is_negative(self):
return bool(self.failures or self.flakes or self.infra_failures)
« no previous file with comments | « no previous file | scripts/slave/recipes/v8.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698