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

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

Issue 564663002: Move bisect-perf-regression.py into auto_bisect directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add telemetry to PYTHONPATH for PRESUBMIT.py. Created 6 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
« no previous file with comments | « tools/bisect-perf-regression_test.py ('k') | tools/run-bisect-perf-regression.py » ('j') | 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
11 On Linux platform, follow the instructions in this document 11 On Linux platform, follow the instructions in this document
12 https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment 12 https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
13 to setup the sandbox manually before running the script. Otherwise the script 13 to setup the sandbox manually before running the script. Otherwise the script
14 fails to launch Chrome and exits with an error. 14 fails to launch Chrome and exits with an error.
15 15
16 This script serves a similar function to bisect-builds.py, except it uses 16 This script serves a similar function to bisect-builds.py, except it uses
17 the bisect-perf-regression.py. This means that that it can actually check out 17 the bisect_perf_regression.py. This means that that it can obtain builds of
18 and build revisions of Chromium that are not available in cloud storage. 18 Chromium for revisions where builds aren't available in cloud storage.
19 """ 19 """
20 20
21 import os 21 import os
22 import subprocess 22 import subprocess
23 import sys 23 import sys
24 24
25 CROS_BOARD_ENV = 'BISECT_CROS_BOARD' 25 CROS_BOARD_ENV = 'BISECT_CROS_BOARD'
26 CROS_IP_ENV = 'BISECT_CROS_IP' 26 CROS_IP_ENV = 'BISECT_CROS_IP'
27 _DIR_TOOLS_ROOT = os.path.abspath(os.path.dirname(__file__)) 27 _TOOLS_DIR = os.path.abspath(os.path.dirname(__file__))
28 _BISECT_SCRIPT_PATH = os.path.join(
29 _TOOLS_DIR, 'auto_bisect', 'bisect_perf_regression.py')
28 30
29 sys.path.append(os.path.join(_DIR_TOOLS_ROOT, 'telemetry')) 31 sys.path.append(os.path.join(_TOOLS_DIR, 'telemetry'))
30 from telemetry.core import browser_options 32 from telemetry.core import browser_options
31 33
32 34
33 def _RunBisectionScript(options): 35 def _RunBisectionScript(options):
34 """Attempts to execute src/tools/bisect-perf-regression.py. 36 """Attempts to execute the bisect script (bisect_perf_regression.py).
35 37
36 Args: 38 Args:
37 options: The configuration options to pass to the bisect script. 39 options: The configuration options to pass to the bisect script.
38 40
39 Returns: 41 Returns:
40 The exit code of bisect-perf-regression.py: 0 on success, otherwise 1. 42 An exit code; 0 for success, 1 for failure.
41 """ 43 """
42 test_command = ('python %s --browser=%s --chrome-root=.' % 44 test_command = ('python %s --browser=%s --chrome-root=.' %
43 (os.path.join(_DIR_TOOLS_ROOT, 'bisect-manual-test.py'), 45 (os.path.join(_TOOLS_DIR, 'bisect-manual-test.py'),
44 options.browser_type)) 46 options.browser_type))
45 47
46 cmd = ['python', os.path.join(_DIR_TOOLS_ROOT, 'bisect-perf-regression.py'), 48 cmd = ['python', _BISECT_SCRIPT_PATH,
47 '-c', test_command, 49 '-c', test_command,
48 '-g', options.good_revision, 50 '-g', options.good_revision,
49 '-b', options.bad_revision, 51 '-b', options.bad_revision,
50 '-m', 'manual_test/manual_test', 52 '-m', 'manual_test/manual_test',
51 '-r', '1', 53 '-r', '1',
52 '--working_directory', options.working_directory, 54 '--working_directory', options.working_directory,
53 '--build_preference', 'ninja', 55 '--build_preference', 'ninja',
54 '--use_goma', 56 '--use_goma',
55 '--no_custom_deps'] 57 '--no_custom_deps']
56 58
(...skipping 18 matching lines...) Expand all
75 cmd.extend(['--target_build_type', options.browser_type.title()]) 77 cmd.extend(['--target_build_type', options.browser_type.title()])
76 78
77 if options.target_build_type: 79 if options.target_build_type:
78 cmd.extend(['--target_build_type', options.target_build_type]) 80 cmd.extend(['--target_build_type', options.target_build_type])
79 81
80 cmd = [str(c) for c in cmd] 82 cmd = [str(c) for c in cmd]
81 83
82 return_code = subprocess.call(cmd) 84 return_code = subprocess.call(cmd)
83 85
84 if return_code: 86 if return_code:
85 print ('Error: bisect-perf-regression.py returned with error %d' % 87 print 'Error: bisect_perf_regression.py had exit code %d.' % return_code
86 return_code)
87 print 88 print
88 89
89 return return_code 90 return return_code
90 91
91 92
92 def main(): 93 def main():
93 """Does a bisect based on the command-line arguments passed in. 94 """Does a bisect based on the command-line arguments passed in.
94 95
95 The user will be prompted to classify each revision as good or bad. 96 The user will be prompted to classify each revision as good or bad.
96 """ 97 """
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 print 'SUID sandbox has not been setup.'\ 143 print 'SUID sandbox has not been setup.'\
143 ' See https://code.google.com/p/chromium/wiki/'\ 144 ' See https://code.google.com/p/chromium/wiki/'\
144 'LinuxSUIDSandboxDevelopment for more information.' 145 'LinuxSUIDSandboxDevelopment for more information.'
145 return 1 146 return 1
146 147
147 return _RunBisectionScript(options) 148 return _RunBisectionScript(options)
148 149
149 150
150 if __name__ == '__main__': 151 if __name__ == '__main__':
151 sys.exit(main()) 152 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/bisect-perf-regression_test.py ('k') | tools/run-bisect-perf-regression.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698