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

Side by Side Diff: trychange.py

Issue 9428047: Improve trychange.py documentation. No logic change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 10 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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Client-side script to send a try job to the try server. It communicates to 6 """Client-side script to send a try job to the try server. It communicates to
7 the try server by either writting to a svn repository or by directly connecting 7 the try server by either writting to a svn repository or by directly connecting
8 to the server by HTTP. 8 to the server by HTTP.
9 """ 9 """
10 10
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 group.add_option("--patchset", type='int', 528 group.add_option("--patchset", type='int',
529 help="Update rietveld issue try job status. This is " 529 help="Update rietveld issue try job status. This is "
530 "optional if --issue is used, In that case, the " 530 "optional if --issue is used, In that case, the "
531 "latest patchset will be used.") 531 "latest patchset will be used.")
532 group.add_option("--dry_run", action='store_true', 532 group.add_option("--dry_run", action='store_true',
533 help="Don't send the try job. This implies --verbose, so " 533 help="Don't send the try job. This implies --verbose, so "
534 "it will print the diff.") 534 "it will print the diff.")
535 parser.add_option_group(group) 535 parser.add_option_group(group)
536 536
537 group = optparse.OptionGroup(parser, "Try job options") 537 group = optparse.OptionGroup(parser, "Try job options")
538 group.add_option("-b", "--bot", action="append", 538 group.add_option(
539 help="Only use specifics build slaves, ex: " 539 "-b", "--bot", action="append",
540 "'--bot win,layout_mac'; see the try " 540 help=("Specify builder and comma separated tests. Can be used multiple "
541 "server waterfall for the slave's name") 541 "times. ex: '--bot win_rel:ui_tests,webkit_unit_tests --bot "
542 "win_layout'; see the try server waterfall for the builders name "
543 "and the tests available. Can also be used with gtest_filter, e.g. "
544 "'--bot win_rel:base_unittests:ValuesTest.*Value'"))
542 group.add_option("-B", "--print_bots", action="store_true", 545 group.add_option("-B", "--print_bots", action="store_true",
543 help="Print bots we would use (e.g. from PRESUBMIT.py)" 546 help="Print bots we would use (e.g. from PRESUBMIT.py)"
544 " and exit. Do not send patch. Like --dry_run" 547 " and exit. Do not send patch. Like --dry_run"
545 " but less verbose.") 548 " but less verbose.")
546 group.add_option("-r", "--revision", 549 group.add_option("-r", "--revision",
547 help="Revision to use for the try job; default: the " 550 help="Revision to use for the try job; default: the "
548 "revision will be determined by the try server; see " 551 "revision will be determined by the try server; see "
549 "its waterfall for more info") 552 "its waterfall for more info")
550 group.add_option("-c", "--clobber", action="store_true", 553 group.add_option("-c", "--clobber", action="store_true",
551 help="Force a clobber before building; e.g. don't do an " 554 help="Force a clobber before building; e.g. don't do an "
552 "incremental build") 555 "incremental build")
553 # TODO(maruel): help="Select a specific configuration, usually 'debug' or " 556 # TODO(maruel): help="Select a specific configuration, usually 'debug' or "
554 # "'release'" 557 # "'release'"
555 group.add_option("--target", help=optparse.SUPPRESS_HELP) 558 group.add_option("--target", help=optparse.SUPPRESS_HELP)
556 559
557 group.add_option("--project", 560 group.add_option("--project",
558 help="Override which project to use. Projects are defined " 561 help="Override which project to use. Projects are defined "
559 "server-side to define what default bot set to use") 562 "server-side to define what default bot set to use")
560 563
561 group.add_option("-t", "--testfilter", action="append", default=[], 564 group.add_option(
562 help="Add a gtest_filter to a test. Use multiple times to " 565 "-t", "--testfilter", action="append", default=[],
563 "specify filters for different tests. (i.e. " 566 help=("Apply a testfilter to all the selected builders. Unless the "
564 "--testfilter base_unittests:ThreadTest.* " 567 "builders configurations are similar, it is preferable to use "
Peter Mayo 2012/02/22 20:45:09 suggest s/similar/the same/ s/it is preferable to
565 "--testfilter ui_tests) If you specify any testfilters " 568 "multiple --bot <builder>:<test> arguments."))
566 "the test results will not be reported in rietveld and "
567 "only tests with filters will run.")
568 569
569 parser.add_option_group(group) 570 parser.add_option_group(group)
570 571
571 group = optparse.OptionGroup(parser, "Patch to run") 572 group = optparse.OptionGroup(parser, "Patch to run")
572 group.add_option("-f", "--file", default=[], dest="files", 573 group.add_option("-f", "--file", default=[], dest="files",
573 metavar="FILE", action="append", 574 metavar="FILE", action="append",
574 help="Use many times to list the files to include in the " 575 help="Use many times to list the files to include in the "
575 "try, relative to the repository root") 576 "try, relative to the repository root")
576 group.add_option("--diff", 577 group.add_option("--diff",
577 help="File containing the diff to try") 578 help="File containing the diff to try")
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 return 1 823 return 1
823 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 824 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
824 print >> sys.stderr, e 825 print >> sys.stderr, e
825 return 1 826 return 1
826 return 0 827 return 0
827 828
828 829
829 if __name__ == "__main__": 830 if __name__ == "__main__":
830 fix_encoding.fix_encoding() 831 fix_encoding.fix_encoding()
831 sys.exit(TryChange(None, None, False)) 832 sys.exit(TryChange(None, None, False))
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