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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py

Issue 1379493002: Use chromium revision instead of blink svn revision when rebaselining layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove multiple repo support Created 5 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 (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 if test_failures.FailureMissingImage in failure_types or test_failures.Failu reMissingImageHash in failure_types: 160 if test_failures.FailureMissingImage in failure_types or test_failures.Failu reMissingImageHash in failure_types:
161 test_dict['is_missing_image'] = True 161 test_dict['is_missing_image'] = True
162 162
163 if test_failures.FailureTestHarnessAssertion in failure_types: 163 if test_failures.FailureTestHarnessAssertion in failure_types:
164 test_dict['is_testharness_test'] = True 164 test_dict['is_testharness_test'] = True
165 165
166 return test_dict 166 return test_dict
167 167
168 168
169 def _chromium_commit_position(scm, path):
170 log = scm.most_recent_log_matching('Cr-Commit-Position:', path)
171 match = re.search('^\s*Cr-Commit-Position:.*@\{#(?P<commit_position>\d+)\}', log, re.MULTILINE)
172 if not match:
173 return ""
174 return str(match.group('commit_position'))
175
176
177 def summarize_results(port_obj, expectations, initial_results, 169 def summarize_results(port_obj, expectations, initial_results,
178 all_retry_results, enabled_pixel_tests_in_retry, 170 all_retry_results, enabled_pixel_tests_in_retry,
179 only_include_failing=False): 171 only_include_failing=False):
180 """Returns a dictionary containing a summary of the test runs, with the foll owing fields: 172 """Returns a dictionary containing a summary of the test runs, with the foll owing fields:
181 'version': a version indicator 173 'version': a version indicator
182 'fixable': The number of fixable tests (NOW - PASS) 174 'fixable': The number of fixable tests (NOW - PASS)
183 'skipped': The number of skipped tests (NOW & SKIPPED) 175 'skipped': The number of skipped tests (NOW & SKIPPED)
184 'num_regressions': The number of non-flaky failures 176 'num_regressions': The number of non-flaky failures
185 'num_flaky': The number of flaky failures 177 'num_flaky': The number of flaky failures
186 'num_passes': The number of expected and unexpected passes 178 'num_passes': The number of expected and unexpected passes
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 results['interrupted'] = initial_results.interrupted # Does results.html ha ve enough information to compute this itself? (by checking total number of resul ts vs. total number of tests?) 324 results['interrupted'] = initial_results.interrupted # Does results.html ha ve enough information to compute this itself? (by checking total number of resul ts vs. total number of tests?)
333 results['layout_tests_dir'] = port_obj.layout_tests_dir() 325 results['layout_tests_dir'] = port_obj.layout_tests_dir()
334 results['has_wdiff'] = port_obj.wdiff_available() 326 results['has_wdiff'] = port_obj.wdiff_available()
335 results['has_pretty_patch'] = port_obj.pretty_patch_available() 327 results['has_pretty_patch'] = port_obj.pretty_patch_available()
336 results['pixel_tests_enabled'] = port_obj.get_option('pixel_tests') 328 results['pixel_tests_enabled'] = port_obj.get_option('pixel_tests')
337 results['seconds_since_epoch'] = int(time.time()) 329 results['seconds_since_epoch'] = int(time.time())
338 results['build_number'] = port_obj.get_option('build_number') 330 results['build_number'] = port_obj.get_option('build_number')
339 results['builder_name'] = port_obj.get_option('builder_name') 331 results['builder_name'] = port_obj.get_option('builder_name')
340 332
341 # Don't do this by default since it takes >100ms. 333 # Don't do this by default since it takes >100ms.
342 # It's only used for uploading data to the flakiness dashboard. 334 # It's only used for rebaselining and uploading data to the flakiness dashbo ard.
343 results['chromium_revision'] = '' 335 results['chromium_revision'] = ''
344 results['blink_revision'] = ''
345 if port_obj.get_option('builder_name'): 336 if port_obj.get_option('builder_name'):
346 for (name, path) in port_obj.repository_paths(): 337 path = port_obj.repository_path()
347 scm = port_obj.host.scm_for_path(path) 338 scm = port_obj.host.scm_for_path(path)
348 if scm: 339 if scm:
349 if name.lower() == 'chromium': 340 results['chromium_revision'] = scm.commit_position(path)
350 rev = _chromium_commit_position(scm, path) 341 else:
351 else: 342 _log.warn('Failed to determine chromium commit position for %s, '
352 rev = scm.svn_revision(path) 343 'leaving "chromium_revision" key blank in full_results.jso n.'
353 if rev: 344 % path)
354 results[name.lower() + '_revision'] = rev
355 else:
356 _log.warn('Failed to determine svn revision for %s, '
357 'leaving "%s_revision" key blank in full_results.json. '
358 % (path, name))
359 345
360 return results 346 return results
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698