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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import contextlib 5 import contextlib
6 import datetime 6 import datetime
7 import json 7 import json
8 import os 8 import os
9 import pipes 9 import pipes
10 import re 10 import re
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 diff = self.m.git( 1520 diff = self.m.git(
1521 'diff', '--staged', '--name-only', '--diff-filter', diff_filter, 1521 'diff', '--staged', '--name-only', '--diff-filter', diff_filter,
1522 stdout=self.m.raw_io.output(), 1522 stdout=self.m.raw_io.output(),
1523 name='Finding changed files matching diff filter: %s' % diff_filter, 1523 name='Finding changed files matching diff filter: %s' % diff_filter,
1524 step_test_data=( 1524 step_test_data=(
1525 lambda: self.m.raw_io.test_api.stream_output( 1525 lambda: self.m.raw_io.test_api.stream_output(
1526 'fake/file1.java\nfake/file2.java;\nfake/file3.java')) 1526 'fake/file1.java\nfake/file2.java;\nfake/file3.java'))
1527 ) 1527 )
1528 return diff.stdout.splitlines() 1528 return diff.stdout.splitlines()
1529 1529
1530 def upload_render_test_failures(self, render_results_dir):
1531 """Uploads render test results. Generates HTML file displaying results."""
1532 args = ['--output-html-file', self.m.raw_io.output(),
1533 '--buildername', self.m.properties['buildername'],
1534 '--build-number', self.m.properties['buildnumber'],
1535 '--render-results-dir', render_results_dir]
1536 step_result = self.m.python(
1537 name='[Render Tests] Upload Results',
1538 script=self.m.path['checkout'].join(
1539 'build', 'android', 'render_tests',
1540 'process_render_test_results.py'),
1541 args=args,
1542 step_test_data=lambda: self.m.raw_io.test_api.output(
1543 '<!DOCTYPE html><html></html>'))
1544 step_result.presentation.logs[
jbudorick 2016/10/25 17:03:40 nit: don't break here; do something like step_r
mikecase (-- gone --) 2016/10/25 20:53:33 Done
1545 'render results'] = step_result.raw_io.output.splitlines()
1546
1530 @contextlib.contextmanager 1547 @contextlib.contextmanager
1531 def handle_exit_codes(self): 1548 def handle_exit_codes(self):
1532 """Handles exit codes emitted by the test runner and other scripts.""" 1549 """Handles exit codes emitted by the test runner and other scripts."""
1533 EXIT_CODES = { 1550 EXIT_CODES = {
1534 'error': 1, 1551 'error': 1,
1535 'infra': 87, 1552 'infra': 87,
1536 'warning': 88, 1553 'warning': 88,
1537 } 1554 }
1538 try: 1555 try:
1539 yield 1556 yield
(...skipping 26 matching lines...) Expand all
1566 script = self.c.test_runner 1583 script = self.c.test_runner
1567 if wrapper_script_suite_name: 1584 if wrapper_script_suite_name:
1568 script = self.m.chromium.output_dir.join('bin', 'run_%s' % 1585 script = self.m.chromium.output_dir.join('bin', 'run_%s' %
1569 wrapper_script_suite_name) 1586 wrapper_script_suite_name)
1570 else: 1587 else:
1571 env = kwargs.get('env', {}) 1588 env = kwargs.get('env', {})
1572 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', 1589 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR',
1573 self.m.chromium.output_dir) 1590 self.m.chromium.output_dir)
1574 kwargs['env'] = env 1591 kwargs['env'] = env
1575 return self.m.python(step_name, script, args, **kwargs) 1592 return self.m.python(step_name, script, args, **kwargs)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698