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

Side by Side Diff: build/android/pylib/local/device/local_device_instrumentation_test_run.py

Issue 2875263002: 📷 Add toggling zoom and test title to RenderTest results. (Closed)
Patch Set: Fixed stupid error. Created 3 years, 7 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
« no previous file with comments | « build/android/pylib/instrumentation/render_test.html.jinja ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 logging 5 import logging
6 import os 6 import os
7 import posixpath 7 import posixpath
8 import re 8 import re
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 else: 581 else:
582 diff_link = '' 582 diff_link = ''
583 583
584 with tempfile.NamedTemporaryFile(suffix='.html') as temp_html: 584 with tempfile.NamedTemporaryFile(suffix='.html') as temp_html:
585 jinja2_env = jinja2.Environment( 585 jinja2_env = jinja2.Environment(
586 loader=jinja2.FileSystemLoader(_JINJA_TEMPLATE_DIR), 586 loader=jinja2.FileSystemLoader(_JINJA_TEMPLATE_DIR),
587 trim_blocks=True) 587 trim_blocks=True)
588 template = jinja2_env.get_template(_JINJA_TEMPLATE_FILENAME) 588 template = jinja2_env.get_template(_JINJA_TEMPLATE_FILENAME)
589 # pylint: disable=no-member 589 # pylint: disable=no-member
590 processed_template_output = template.render( 590 processed_template_output = template.render(
591 test_name=failure_filename,
591 failure_link=failure_link, 592 failure_link=failure_link,
592 golden_link=golden_link, 593 golden_link=golden_link,
593 diff_link=diff_link) 594 diff_link=diff_link)
594 595
595 temp_html.write(processed_template_output) 596 temp_html.write(processed_template_output)
596 temp_html.flush() 597 temp_html.flush()
597 html_results_link = google_storage_helper.upload( 598 html_results_link = google_storage_helper.upload(
598 google_storage_helper.unique_name('render_html', device=device), 599 google_storage_helper.unique_name('render_html', device=device),
599 temp_html.name, 600 temp_html.name,
600 bucket=render_tests_bucket, 601 bucket=render_tests_bucket,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) 638 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations)
638 639
639 return timeout 640 return timeout
640 641
641 def _IsRenderTest(test): 642 def _IsRenderTest(test):
642 """Determines if a test or list of tests has a RenderTest amongst them.""" 643 """Determines if a test or list of tests has a RenderTest amongst them."""
643 if not isinstance(test, list): 644 if not isinstance(test, list):
644 test = [test] 645 test = [test]
645 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get( 646 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get(
646 FEATURE_ANNOTATION, ()) for t in test]) 647 FEATURE_ANNOTATION, ()) for t in test])
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/render_test.html.jinja ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698