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

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

Issue 2439213002: Add step to process Render Test results. (Closed)
Patch Set: Add step to process Render Test results. Created 4 years, 2 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/recipe_modules/chromium_tests/chromium_fyi.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9b2008567e1e357194ec3885bcaefd190df0acfa..e4a741d38f0a1fa3c5a768cb682e8c3c0d95b702 100644
--- a/scripts/slave/recipe_modules/chromium_android/api.py
+++ b/scripts/slave/recipe_modules/chromium_android/api.py
@@ -898,6 +898,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,
@@ -957,6 +958,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')):
@@ -967,9 +970,11 @@ class AndroidApi(recipe_api.RecipeApi):
cs_base_url)
self.m.step.active_result.presentation.logs[
'result_details'] = details
- self.copy_gtest_results(result_step,
- self.m.step.active_result)
- return step_result
+ # 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)
mikecase (-- gone --) 2016/10/25 20:53:34 So, idk what you think about this. But if render_r
jbudorick 2016/10/25 21:37:32 As written, this is kind of nasty but does work. I
def copy_gtest_results(self, result_step, active_step):
if (hasattr(result_step, 'test_utils') and
@@ -993,6 +998,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')
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium_tests/chromium_fyi.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698