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

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/steps.py

Issue 2330133002: Updating the SwarmingIsolatedScriptTest to upload chartjson results to the (Closed)
Patch Set: Removing stale code Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 datetime 5 import datetime
6 import re 6 import re
7 import string 7 import string
8 8
9 from slave import slave_utils
10 from slave import results_dashboard
9 11
10 class Test(object): 12 class Test(object):
11 """ 13 """
12 Base class for tests that can be retried after deapplying a previously 14 Base class for tests that can be retried after deapplying a previously
13 applied patch. 15 applied patch.
14 """ 16 """
15 17
16 def __init__(self): 18 def __init__(self):
17 super(Test, self).__init__() 19 super(Test, self).__init__()
18 self._test_runs = {} 20 self._test_runs = {}
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 1077
1076 def validate_task_results(self, api, step_result): 1078 def validate_task_results(self, api, step_result):
1077 results = getattr(step_result, 'isolated_script_results', None) or {} 1079 results = getattr(step_result, 'isolated_script_results', None) or {}
1078 1080
1079 try: 1081 try:
1080 failures = results['failures'] 1082 failures = results['failures']
1081 valid = results['valid'] 1083 valid = results['valid']
1082 if not failures and step_result.retcode != 0: 1084 if not failures and step_result.retcode != 0:
1083 failures = ['%s (entire test suite)' % self.name] 1085 failures = ['%s (entire test suite)' % self.name]
1084 valid = False 1086 valid = False
1087 if 'chartjson' in results and 'charts' in results['chartjson']:
Ken Russell (switch to Gerrit) 2016/09/12 19:35:40 Per comment on dependent CL https://codereview.chr
eyaich1 2016/09/13 16:52:59 Done.
1088 # This is a swarmed benchmark, need to upload results to the dashboard
1089 # Not sure if we still need to process the valid/failures since the
1090 # output we need will be written by telemetry and the retcode should
1091 # turn the test red or green
1092 main_revision = \
1093 GetMainRevision(api.properties, api.chromium.c.build_dir)
1094 blink_revision = GetBlinkRevision(api.chromium.c.build_dir):
1095 revisions = slave_utils.GetTelemetryRevisions(
1096 api.properties, main_revision, blink_revision)
1097 reference_build = 'reference' in self.name
1098 stripped_test_name = self.name.replace('.reference', '')
1099 dashboard_json = results_dashboard.MakeDashboardJsonV1(
1100 results['chartjson'],
1101 revisions, stripped_test_name, api.properties['perf-id'],
1102 api.properties['buildername'], api.properties['buildnumber'],
1103 None, reference_build)
1104 if dashboard_json :
1105 logging.debug(json.dumps(dashboard_json , indent=2))
1106 results_dashboard.SendResults(
1107 dashboard_json ,
1108 api.properties['results-url'],
1109 api.chromium.c.build_dir)
1110 else:
1111 print 'Error: No json output from telemetry.'
1112 print '@@@STEP_FAILURE@@@'
1113
1114
1085 except (ValueError, KeyError) as e: 1115 except (ValueError, KeyError) as e:
1086 step_result.presentation.logs['invalid_results_exc'] = [str(e)] 1116 step_result.presentation.logs['invalid_results_exc'] = [str(e)]
1087 valid = False 1117 valid = False
1088 failures = None 1118 failures = None
1089 if valid: 1119 if valid:
1090 step_result.presentation.step_text += api.test_utils.format_step_text([ 1120 step_result.presentation.step_text += api.test_utils.format_step_text([
1091 ['failures:', failures] 1121 ['failures:', failures]
1092 ]) 1122 ])
1093 return valid, failures 1123 return valid, failures
1094 1124
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 args=args) 1775 args=args)
1746 api.gsutil.upload( 1776 api.gsutil.upload(
1747 temp_output_dir.join( 1777 temp_output_dir.join(
1748 '%s-android-chrome.json' % timestamp_string), 1778 '%s-android-chrome.json' % timestamp_string),
1749 'chromium-annotated-tests', 'android') 1779 'chromium-annotated-tests', 'android')
1750 1780
1751 GOMA_TESTS = [ 1781 GOMA_TESTS = [
1752 GTestTest('base_unittests'), 1782 GTestTest('base_unittests'),
1753 GTestTest('content_unittests'), 1783 GTestTest('content_unittests'),
1754 ] 1784 ]
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/swarming/api.py » ('j') | scripts/slave/recipe_modules/swarming/api.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698