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
4 # found in the LICENSE file.
6 """Prepare Performance Test Bisect Tool
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.
13 ./tools/prepare-bisect-perf-regressions.py --working_directory "~/builds"
14 --output_buildbot_annotations
16 Would result in creating ~/builds/bisect and then populating it with a copy of
29 usage
= ('%prog [options] [-- chromium-options]\n'
30 'Prepares a temporary depot for use on a trybot.')
32 parser
= optparse
.OptionParser(usage
=usage
)
34 parser
.add_option('-w', '--working_directory',
36 help='Path to the working directory where the script will '
37 'do an initial checkout of the chromium depot. The '
38 'files will be placed in a subdirectory "bisect" under '
39 'working_directory and that will be used to perform the '
41 parser
.add_option('--output_buildbot_annotations',
43 help='Add extra annotation output for buildbot.')
44 (opts
, args
) = parser
.parse_args()
46 if not opts
.working_directory
:
47 print 'Error: missing required parameter: --working_directory'
52 return bisect_utils
.CreateBisectDirectoryAndSetupDepot(opts
, True)
55 if __name__
== '__main__':