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

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

Issue 2439213002: Add step to process Render Test results. (Closed)
Patch Set: Addressed jbudorick's nits Created 4 years, 1 month 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
Index: scripts/slave/recipe_modules/chromium_android/api.py
diff --git a/scripts/slave/recipe_modules/chromium_android/api.py b/scripts/slave/recipe_modules/chromium_android/api.py
index d6843c772e8b3c356b9b188013729b62b11d2867..240428a78fa662a56fc22c2bb8f9692bc467dc5b 100644
--- a/scripts/slave/recipe_modules/chromium_android/api.py
+++ b/scripts/slave/recipe_modules/chromium_android/api.py
@@ -934,6 +934,7 @@ class AndroidApi(recipe_api.RecipeApi):
result_details=False,
cs_base_url=None,
store_tombstones=False,
+ render_results_dir=None,
**kwargs):
args = [
'--blacklist-file', self.blacklist_file,
@@ -993,6 +994,8 @@ class AndroidApi(recipe_api.RecipeApi):
**kwargs)
finally:
result_step = self.m.step.active_result
+ if render_results_dir:
+ self._upload_render_test_failures(render_results_dir)
if result_details:
if (hasattr(result_step, 'test_utils') and
hasattr(result_step.test_utils, 'gtest_results')):
@@ -1001,10 +1004,12 @@ class AndroidApi(recipe_api.RecipeApi):
details = self.create_result_details(step_name,
json_results,
cs_base_url)
- self.m.step.active_result.presentation.logs[
- 'result_details'] = details
- self.copy_gtest_results(result_step,
- self.m.step.active_result)
+ self.m.step.active_result.presentation.logs['result_details'] = (
ghost stip (do not use) 2016/12/08 20:16:02 I would have left it the same as before but this i
+ details)
+ # Need to copy gtest results over. A few places call
+ # |run_instrumentation_suite| function and then look for results in
+ # the active_result.
+ self.copy_gtest_results(result_step, self.m.step.active_result)
return step_result
def copy_gtest_results(self, result_step, active_step):
@@ -1029,6 +1034,23 @@ class AndroidApi(recipe_api.RecipeApi):
'<!DOCTYPE html><html></html>')))
return result_details.stdout.splitlines()
+ def _upload_render_test_failures(self, render_results_dir):
+ """Uploads render test results. Generates HTML file displaying results."""
+ args = ['--output-html-file', self.m.raw_io.output(),
+ '--buildername', self.m.properties['buildername'],
+ '--build-number', self.m.properties['buildnumber'],
+ '--render-results-dir', render_results_dir]
+ step_result = self.m.python(
+ name='[Render Tests] Upload Results',
+ script=self.m.path['checkout'].join(
+ 'build', 'android', 'render_tests',
+ 'process_render_test_results.py'),
+ args=args,
+ step_test_data=lambda: self.m.raw_io.test_api.output(
+ '<!DOCTYPE html><html></html>'))
+ step_result.presentation.logs['render results'] = (
+ step_result.raw_io.output.splitlines())
+
def logcat_dump(self, gs_bucket=None):
if gs_bucket:
log_path = self.m.chromium.output_dir.join('full_log')
@@ -1261,7 +1283,7 @@ class AndroidApi(recipe_api.RecipeApi):
if json_results_file:
args.extend(['--json-results-file', json_results_file])
- self.test_runner(
+ return self.test_runner(
'%s%s' % (str(suite), ' (%s)' % suffix if suffix else ''),
['junit', '-s', suite] + args,
env=self.m.chromium.get_env(),

Powered by Google App Engine
This is Rietveld 408576698