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

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

Issue 287063004: Fix ninja build_type for Android builder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 if IsWindows(): 647 if IsWindows():
648 os.environ['GYP_DEFINES'] = 'component=shared_library '\ 648 os.environ['GYP_DEFINES'] = 'component=shared_library '\
649 'incremental_chrome_dll=1 disable_nacl=1 fastbuild=1 '\ 649 'incremental_chrome_dll=1 disable_nacl=1 fastbuild=1 '\
650 'chromium_win_pch=0' 650 'chromium_win_pch=0'
651 elif build_system == 'make': 651 elif build_system == 'make':
652 os.environ['GYP_GENERATORS'] = 'make' 652 os.environ['GYP_GENERATORS'] = 'make'
653 else: 653 else:
654 raise RuntimeError('%s build not supported.' % build_system) 654 raise RuntimeError('%s build not supported.' % build_system)
655 655
656 656
657 def BuildWithMake(threads, targets, build_type): 657 def BuildWithMake(threads, targets, build_type='Release'):
658 cmd = ['make', 'BUILDTYPE=%s' % build_type] 658 cmd = ['make', 'BUILDTYPE=%s' % build_type]
659 659
660 if threads: 660 if threads:
661 cmd.append('-j%d' % threads) 661 cmd.append('-j%d' % threads)
662 662
663 cmd += targets 663 cmd += targets
664 664
665 return_code = RunProcess(cmd) 665 return_code = RunProcess(cmd)
666 666
667 return not return_code 667 return not return_code
668 668
669 669
670 def BuildWithNinja(threads, targets, build_type): 670 def BuildWithNinja(threads, targets, build_type='Release'):
671 cmd = ['ninja', '-C', os.path.join('out', build_type)] 671 cmd = ['ninja', '-C', os.path.join('out', build_type)]
672 672
673 if threads: 673 if threads:
674 cmd.append('-j%d' % threads) 674 cmd.append('-j%d' % threads)
675 675
676 cmd += targets 676 cmd += targets
677 677
678 return_code = RunProcess(cmd) 678 return_code = RunProcess(cmd)
679 679
680 return not return_code 680 return not return_code
681 681
682 682
683 def BuildWithVisualStudio(targets, build_type): 683 def BuildWithVisualStudio(targets, build_type='Release'):
shatch 2014/05/15 22:43:52 Since we're repeating 'Release' all over, should t
prasadv 2014/05/15 23:14:32 I think, target_build_type flag is by default set
shatch 2014/05/15 23:34:29 Sorry, I was a bit unclear, more just meant maybe
684 path_to_devenv = os.path.abspath( 684 path_to_devenv = os.path.abspath(
685 os.path.join(os.environ['VS100COMNTOOLS'], '..', 'IDE', 'devenv.com')) 685 os.path.join(os.environ['VS100COMNTOOLS'], '..', 'IDE', 'devenv.com'))
686 path_to_sln = os.path.join(os.getcwd(), 'chrome', 'chrome.sln') 686 path_to_sln = os.path.join(os.getcwd(), 'chrome', 'chrome.sln')
687 cmd = [path_to_devenv, '/build', build_type, path_to_sln] 687 cmd = [path_to_devenv, '/build', build_type, path_to_sln]
688 688
689 for t in targets: 689 for t in targets:
690 cmd.extend(['/Project', t]) 690 cmd.extend(['/Project', t])
691 691
692 return_code = RunProcess(cmd) 692 return_code = RunProcess(cmd)
693 693
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 840
841 Returns: 841 Returns:
842 True if build was successful. 842 True if build was successful.
843 """ 843 """
844 threads = None 844 threads = None
845 if opts.use_goma: 845 if opts.use_goma:
846 threads = 64 846 threads = 64
847 847
848 build_success = False 848 build_success = False
849 if opts.build_preference == 'ninja': 849 if opts.build_preference == 'ninja':
850 build_success = BuildWithNinja(threads, self._GetTargets()) 850 build_success = BuildWithNinja(
851 threads, self._GetTargets(), opts.target_build_type)
851 else: 852 else:
852 assert False, 'No build system defined.' 853 assert False, 'No build system defined.'
853 854
854 return build_success 855 return build_success
855 856
856 857
857 class AndroidChromeBuilder(AndroidBuilder): 858 class AndroidChromeBuilder(AndroidBuilder):
858 """AndroidBuilder is used to build on android's chrome.""" 859 """AndroidBuilder is used to build on android's chrome."""
859 def __init__(self, opts): 860 def __init__(self, opts):
860 super(AndroidChromeBuilder, self).__init__(opts) 861 super(AndroidChromeBuilder, self).__init__(opts)
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after
3904 # The perf dashboard scrapes the "results" step in order to comment on 3905 # The perf dashboard scrapes the "results" step in order to comment on
3905 # bugs. If you change this, please update the perf dashboard as well. 3906 # bugs. If you change this, please update the perf dashboard as well.
3906 bisect_utils.OutputAnnotationStepStart('Results') 3907 bisect_utils.OutputAnnotationStepStart('Results')
3907 print 'Error: %s' % e.message 3908 print 'Error: %s' % e.message
3908 if opts.output_buildbot_annotations: 3909 if opts.output_buildbot_annotations:
3909 bisect_utils.OutputAnnotationStepClosed() 3910 bisect_utils.OutputAnnotationStepClosed()
3910 return 1 3911 return 1
3911 3912
3912 if __name__ == '__main__': 3913 if __name__ == '__main__':
3913 sys.exit(main()) 3914 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