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

Side by Side Diff: tools/bisect-perf-regression.py

Issue 555503004: Set appropriate working directory on build failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Performance Test Bisect Tool 6 """Performance Test Bisect Tool
7 7
8 This script bisects a series of changelists using binary search. It starts at 8 This script bisects a series of changelists using binary search. It starts at
9 a bad revision where a performance metric has regressed, and asks for a last 9 a bad revision where a performance metric has regressed, and asks for a last
10 known-good revision. It will then binary search across this revision range by 10 known-good revision. It will then binary search across this revision range by
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 return (None, None) 1518 return (None, None)
1519 1519
1520 def BuildCurrentRevision(self, depot, revision=None): 1520 def BuildCurrentRevision(self, depot, revision=None):
1521 """Builds chrome and performance_ui_tests on the current revision. 1521 """Builds chrome and performance_ui_tests on the current revision.
1522 1522
1523 Returns: 1523 Returns:
1524 True if the build was successful. 1524 True if the build was successful.
1525 """ 1525 """
1526 if self.opts.debug_ignore_build: 1526 if self.opts.debug_ignore_build:
1527 return True 1527 return True
1528
1529 build_success = False
1528 cwd = os.getcwd() 1530 cwd = os.getcwd()
qyearsley 2014/09/09 00:59:57 (Note, somewhat unrelated to this CL: this variabl
1529 os.chdir(self.src_cwd) 1531 os.chdir(self.src_cwd)
1530 # Fetch build archive for the given revision from the cloud storage when 1532 # Fetch build archive for the given revision from the cloud storage when
1531 # the storage bucket is passed. 1533 # the storage bucket is passed.
1532 if self.IsDownloadable(depot) and revision: 1534 if self.IsDownloadable(depot) and revision:
1533 deps_patch = None 1535 deps_patch = None
1534 if depot != 'chromium': 1536 if depot != 'chromium':
1535 # Create a DEPS patch with new revision for dependency repository. 1537 # Create a DEPS patch with new revision for dependency repository.
1536 revision, deps_patch = self.CreateDEPSPatch(depot, revision) 1538 revision, deps_patch = self.CreateDEPSPatch(depot, revision)
1537 if self.DownloadCurrentBuild(revision, patch=deps_patch): 1539 if self.DownloadCurrentBuild(revision, patch=deps_patch):
1538 os.chdir(cwd)
1539 if deps_patch: 1540 if deps_patch:
1540 # Reverts the changes to DEPS file. 1541 # Reverts the changes to DEPS file.
1541 self.source_control.CheckoutFileAtRevision( 1542 self.source_control.CheckoutFileAtRevision(
1542 bisect_utils.FILE_DEPS, revision, cwd=self.src_cwd) 1543 bisect_utils.FILE_DEPS, revision, cwd=self.src_cwd)
1543 return True 1544 build_success = True
1544 return False 1545 else:
1545 1546 # These codes are executed when bisect bots builds binaries locally.
1546 # These codes are executed when bisect bots builds binaries locally. 1547 build_success = self.builder.Build(depot, self.opts)
1547 build_success = self.builder.Build(depot, self.opts)
1548 os.chdir(cwd) 1548 os.chdir(cwd)
1549 return build_success 1549 return build_success
1550 1550
1551 def RunGClientHooks(self): 1551 def RunGClientHooks(self):
1552 """Runs gclient with runhooks command. 1552 """Runs gclient with runhooks command.
1553 1553
1554 Returns: 1554 Returns:
1555 True if gclient reports no errors. 1555 True if gclient reports no errors.
1556 """ 1556 """
1557 if self.opts.debug_ignore_build: 1557 if self.opts.debug_ignore_build:
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after
3397 # bugs. If you change this, please update the perf dashboard as well. 3397 # bugs. If you change this, please update the perf dashboard as well.
3398 bisect_utils.OutputAnnotationStepStart('Results') 3398 bisect_utils.OutputAnnotationStepStart('Results')
3399 print 'Error: %s' % e.message 3399 print 'Error: %s' % e.message
3400 if opts.output_buildbot_annotations: 3400 if opts.output_buildbot_annotations:
3401 bisect_utils.OutputAnnotationStepClosed() 3401 bisect_utils.OutputAnnotationStepClosed()
3402 return 1 3402 return 1
3403 3403
3404 3404
3405 if __name__ == '__main__': 3405 if __name__ == '__main__':
3406 sys.exit(main()) 3406 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698