OLD | NEW |
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 """Prepare Performance Test Bisect Tool | 6 """Prepare Performance Test Bisect Tool |
7 | 7 |
8 This script is used by a trybot to create a working directory and sync an | 8 This script is used by a trybot to create a working directory and sync an |
9 initial copy of the depot for use in bisecting performance regressions. | 9 initial copy of the depot for use in bisecting performance regressions. |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 parser.add_option('-w', '--working_directory', | 34 parser.add_option('-w', '--working_directory', |
35 type='str', | 35 type='str', |
36 help='Path to the working directory where the script will ' | 36 help='Path to the working directory where the script will ' |
37 'do an initial checkout of the chromium depot. The ' | 37 'do an initial checkout of the chromium depot. The ' |
38 'files will be placed in a subdirectory "bisect" under ' | 38 'files will be placed in a subdirectory "bisect" under ' |
39 'working_directory and that will be used to perform the ' | 39 'working_directory and that will be used to perform the ' |
40 'bisection.') | 40 'bisection.') |
41 parser.add_option('--output_buildbot_annotations', | 41 parser.add_option('--output_buildbot_annotations', |
42 action="store_true", | 42 action="store_true", |
43 help='Add extra annotation output for buildbot.') | 43 help='Add extra annotation output for buildbot.') |
| 44 parser.add_option('--target_platform', |
| 45 type='choice', |
| 46 choices=['chromium', 'cros', 'android'], |
| 47 default='chromium', |
| 48 help='The target platform. Choices are "chromium" (current ' |
| 49 'platform), "cros", or "android". If you specify something ' |
| 50 'other than "chromium", you must be properly set up to ' |
| 51 'build that platform.') |
44 (opts, args) = parser.parse_args() | 52 (opts, args) = parser.parse_args() |
45 | 53 |
46 if not opts.working_directory: | 54 if not opts.working_directory: |
47 print 'Error: missing required parameter: --working_directory' | 55 print 'Error: missing required parameter: --working_directory' |
48 print | 56 print |
49 parser.print_help() | 57 parser.print_help() |
50 return 1 | 58 return 1 |
51 | 59 |
52 return bisect_utils.CreateBisectDirectoryAndSetupDepot(opts, True) | 60 return bisect_utils.CreateBisectDirectoryAndSetupDepot(opts, True) |
53 | 61 |
54 | 62 |
55 if __name__ == '__main__': | 63 if __name__ == '__main__': |
56 sys.exit(main()) | 64 sys.exit(main()) |
OLD | NEW |