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

Side by Side Diff: tools/run-bisect-manual-test.py

Issue 331593007: Enable manual bisects on Chrome for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 6 years, 6 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 | « tools/bisect_utils.py ('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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 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 """Run Manual Test Bisect Tool 6 """Run Manual Test Bisect Tool
7 7
8 An example usage: 8 An example usage:
9 tools/run-bisect-manual-test.py -g 201281 -b 201290 9 tools/run-bisect-manual-test.py -g 201281 -b 201290
10 10
(...skipping 30 matching lines...) Expand all
41 (os.path.join(_DIR_TOOLS_ROOT, 'bisect-manual-test.py'), 41 (os.path.join(_DIR_TOOLS_ROOT, 'bisect-manual-test.py'),
42 options.browser_type) 42 options.browser_type)
43 43
44 cmd = ['python', os.path.join(_DIR_TOOLS_ROOT, 'bisect-perf-regression.py'), 44 cmd = ['python', os.path.join(_DIR_TOOLS_ROOT, 'bisect-perf-regression.py'),
45 '-c', test_command, 45 '-c', test_command,
46 '-g', options.good_revision, 46 '-g', options.good_revision,
47 '-b', options.bad_revision, 47 '-b', options.bad_revision,
48 '-m', 'manual_test/manual_test', 48 '-m', 'manual_test/manual_test',
49 '-r', '1', 49 '-r', '1',
50 '--working_directory', options.working_directory, 50 '--working_directory', options.working_directory,
51 '--target_build_type', options.browser_type.title(),
52 '--build_preference', 'ninja', 51 '--build_preference', 'ninja',
53 '--use_goma', 52 '--use_goma',
54 '--no_custom_deps'] 53 '--no_custom_deps']
55 54
55 if options.extra_src:
56 cmd.extend(['--extra_src', options.extra_src])
57
56 if 'cros' in options.browser_type: 58 if 'cros' in options.browser_type:
57 cmd.extend(['--target_platform', 'cros']) 59 cmd.extend(['--target_platform', 'cros'])
58 60
59 if os.environ[CROS_BOARD_ENV] and os.environ[CROS_IP_ENV]: 61 if os.environ[CROS_BOARD_ENV] and os.environ[CROS_IP_ENV]:
60 cmd.extend(['--cros_board', os.environ[CROS_BOARD_ENV]]) 62 cmd.extend(['--cros_board', os.environ[CROS_BOARD_ENV]])
61 cmd.extend(['--cros_remote_ip', os.environ[CROS_IP_ENV]]) 63 cmd.extend(['--cros_remote_ip', os.environ[CROS_IP_ENV]])
62 else: 64 else:
63 print 'Error: Cros build selected, but BISECT_CROS_IP or'\ 65 print 'Error: Cros build selected, but BISECT_CROS_IP or'\
64 'BISECT_CROS_BOARD undefined.' 66 'BISECT_CROS_BOARD undefined.'
65 print 67 print
66 return 1 68 return 1
69 elif 'android-chrome' in options.browser_type:
70 cmd.extend(['--target_platform', 'android-chrome'])
67 elif 'android' in options.browser_type: 71 elif 'android' in options.browser_type:
68 cmd.extend(['--target_platform', 'android']) 72 cmd.extend(['--target_platform', 'android'])
73 elif not options.target_build_type:
74 cmd.extend(['--target_build_type', options.browser_type.title()])
75
76 if options.target_build_type:
77 cmd.extend(['--target_build_type', options.target_build_type])
78
69 79
70 cmd = [str(c) for c in cmd] 80 cmd = [str(c) for c in cmd]
71 81
72 return_code = subprocess.call(cmd) 82 return_code = subprocess.call(cmd)
73 83
74 if return_code: 84 if return_code:
75 print 'Error: bisect-perf-regression.py returned with error %d' %\ 85 print 'Error: bisect-perf-regression.py returned with error %d' %\
76 return_code 86 return_code
77 print 87 print
78 88
(...skipping 16 matching lines...) Expand all
95 type='str', 105 type='str',
96 help='A revision to start bisection where performance' + 106 help='A revision to start bisection where performance' +
97 ' test is known to pass. Must be earlier than the ' + 107 ' test is known to pass. Must be earlier than the ' +
98 'bad revision. May be either a git or svn revision.') 108 'bad revision. May be either a git or svn revision.')
99 parser.add_option('-w', '--working_directory', 109 parser.add_option('-w', '--working_directory',
100 type='str', 110 type='str',
101 default='..', 111 default='..',
102 help='A working directory to supply to the bisection ' 112 help='A working directory to supply to the bisection '
103 'script, which will use it as the location to checkout ' 113 'script, which will use it as the location to checkout '
104 'a copy of the chromium depot.') 114 'a copy of the chromium depot.')
105 115 parser.add_option('--extra_src',
116 type='str',
117 help='Path to extra source file. If this is supplied, '
118 'bisect script will use this to override default behavior.')
119 parser.add_option('--target_build_type',
120 type='choice',
121 choices=['Release', 'Debug'],
122 help='The target build type. Choices are "Release" '
123 'or "Debug".')
106 options, args = parser.parse_args() 124 options, args = parser.parse_args()
107 error_msg = '' 125 error_msg = ''
108 if not options.good_revision: 126 if not options.good_revision:
109 error_msg += 'Error: missing required parameter: --good_revision\n' 127 error_msg += 'Error: missing required parameter: --good_revision\n'
110 if not options.bad_revision: 128 if not options.bad_revision:
111 error_msg += 'Error: missing required parameter: --bad_revision\n' 129 error_msg += 'Error: missing required parameter: --bad_revision\n'
112 130
113 if error_msg: 131 if error_msg:
114 print error_msg 132 print error_msg
115 parser.print_help() 133 parser.print_help()
116 return 1 134 return 1
117 135
118 if 'android' not in options.browser_type and sys.platform.startswith('linux'): 136 if 'android' not in options.browser_type and sys.platform.startswith('linux'):
119 if not os.environ.get('CHROME_DEVEL_SANDBOX'): 137 if not os.environ.get('CHROME_DEVEL_SANDBOX'):
120 print 'SUID sandbox has not been setup.'\ 138 print 'SUID sandbox has not been setup.'\
121 ' See https://code.google.com/p/chromium/wiki/'\ 139 ' See https://code.google.com/p/chromium/wiki/'\
122 'LinuxSUIDSandboxDevelopment for more information.' 140 'LinuxSUIDSandboxDevelopment for more information.'
123 return 1 141 return 1
124 142
125 return _RunBisectionScript(options) 143 return _RunBisectionScript(options)
126 144
127 145
128 if __name__ == '__main__': 146 if __name__ == '__main__':
129 sys.exit(main()) 147 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/bisect_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698