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

Unified Diff: scripts/slave/recipe_modules/amp/api.py

Issue 954743003: Make step status EXCEPTION when test runner has infrastructure failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Moved exit code dict to test_runner function. Created 5 years, 10 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 | « scripts/slave/recipe_modules/amp/__init__.py ('k') | scripts/slave/recipe_modules/amp/example.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/amp/api.py
diff --git a/scripts/slave/recipe_modules/amp/api.py b/scripts/slave/recipe_modules/amp/api.py
index 454d73b0222312a090cb13619b3f266d46dc636c..b6d878f2ca6d8890f9ec027354fd310d27cb403e 100644
--- a/scripts/slave/recipe_modules/amp/api.py
+++ b/scripts/slave/recipe_modules/amp/api.py
@@ -12,6 +12,10 @@ class AmpApi(recipe_api.RecipeApi):
self._trigger_file_dir = None
self._base_results_dir = None
+ def setup(self):
+ """Sets up necessary configs."""
+ self.m.chromium_android.set_config('base_config')
+
@recipe_api.non_step
def _get_trigger_dir(self):
if not self._trigger_file_dir:
@@ -58,9 +62,8 @@ class AmpApi(recipe_api.RecipeApi):
},
},
})
- step_result = self.m.python(
+ step_result = self.m.chromium_android.test_runner(
'[trigger] %s' % suite,
- self.m.path['checkout'].join('build', 'android', 'test_runner.py'),
args=args,
step_test_data=step_test_data)
trigger_data = step_result.json.output
@@ -109,9 +112,8 @@ class AmpApi(recipe_api.RecipeApi):
if verbose:
args += ['--verbose']
try:
- step_result = self.m.python(
+ step_result = self.m.chromium_android.test_runner(
'[collect] %s' % suite,
- self.m.path['checkout'].join('build', 'android', 'test_runner.py'),
args=args)
except self.m.step.StepFailure as f:
step_result = f.result
@@ -119,7 +121,7 @@ class AmpApi(recipe_api.RecipeApi):
finally:
step_result.presentation.step_text = device_info_text
if (not device_data and
- step_result.presentation.status != self.m.step.FAILURE):
+ step_result.presentation.status == self.m.step.SUCCESS):
step_result.presentation.status = self.m.step.WARNING
def upload_logcat_to_gs(self, bucket, suite):
« no previous file with comments | « scripts/slave/recipe_modules/amp/__init__.py ('k') | scripts/slave/recipe_modules/amp/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698