Exemple #1
0
 def __init__(
     self,
     options=None
 ):  # Default values should never be collections (like []) as default values are shared between invocations
     options_list = (options or []) + [
         make_option(
             "--no-confirm",
             action="store_false",
             dest="confirm",
             default=True,
             help=
             "Do not ask the user for confirmation before running the queue.  Dangerous!"
         ),
         make_option(
             "--exit-after-iteration",
             action="store",
             type="int",
             dest="iterations",
             default=None,
             help=
             "Stop running the queue after iterating this number of times."
         ),
     ]
     self.help_text = "Run the %s" % self.name
     Command.__init__(self, options=options_list)
     self._iteration_count = 0
     if not hasattr(self, 'architecture'):
         self.architecture = None
Exemple #2
0
 def __init__(self):
     options = [
         make_option(
             "-b",
             "--bug-id",
             action="store",
             type="string",
             dest="bug_id",
             help="Specify bug id if no URL is provided in the commit log."
         ),
         make_option(
             "--add-log-as-comment",
             action="store_true",
             dest="add_log_as_comment",
             default=False,
             help=
             "Add commit log message as a comment when uploading the patch."
         ),
         make_option(
             "-m",
             "--description",
             action="store",
             type="string",
             dest="description",
             help=
             "Description string for the attachment (default: description from commit message)"
         ),
         steps.Options.obsolete_patches,
         steps.Options.review,
         steps.Options.request_commit,
         steps.Options.ews,
     ]
     Command.__init__(self, options=options, requires_local_commits=True)
Exemple #3
0
 def __init__(self, options=None): # Default values should never be collections (like []) as default values are shared between invocations
     options_list = (options or []) + [
         make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue.  Dangerous!"),
         make_option("--exit-after-iteration", action="store", type="int", dest="iterations", default=None, help="Stop running the queue after iterating this number of times."),
     ]
     Command.__init__(self, "Run the %s" % self.name, options=options_list)
     self._iteration_count = 0
Exemple #4
0
 def __init__(self):
     options = [
         make_option(
             "--bug-id",
             action="store",
             type="string",
             dest="bug_id",
             help="Specify bug id if no URL is provided in the commit log."
         ),
         make_option("--comment",
                     action="store",
                     type="string",
                     dest="comment",
                     help="Text to include in bug comment."),
         make_option("--open",
                     action="store_true",
                     default=False,
                     dest="open_bug",
                     help="Open bug in default web browser (Mac only)."),
         make_option("--update-only",
                     action="store_true",
                     default=False,
                     dest="update_only",
                     help="Add comment to the bug, but do not close it."),
     ]
     Command.__init__(self, options=options)
Exemple #5
0
 def __init__(self):
     options = [
         steps.Options.cc,
         steps.Options.cc_radar,
         steps.Options.component,
         make_option(
             "--no-prompt",
             action="store_false",
             dest="prompt",
             default=True,
             help=
             "Do not prompt for bug title and comment; use commit log instead."
         ),
         make_option("--no-review",
                     action="store_false",
                     dest="review",
                     default=True,
                     help="Do not mark the patch for review."),
         make_option(
             "--request-commit",
             action="store_true",
             dest="request_commit",
             default=False,
             help="Mark the patch as needing auto-commit after review."),
     ]
     Command.__init__(self, options=options)
Exemple #6
0
 def __init__(self):
     options = [
         make_option("--bugs",
                     action="store_true",
                     dest="bugs",
                     help="Output bug links instead of patch links"),
     ]
     Command.__init__(self, options=options)
Exemple #7
0
 def __init__(self):
     options = [
         make_option("--bug-id", action="store", type="string", dest="bug_id", help="Specify bug id if no URL is provided in the commit log."),
         make_option("--comment", action="store", type="string", dest="comment", help="Text to include in bug comment."),
         make_option("--open", action="store_true", default=False, dest="open_bug", help="Open bug in default web browser (Mac only)."),
         make_option("--update-only", action="store_true", default=False, dest="update_only", help="Add comment to the bug, but do not close it."),
     ]
     Command.__init__(self, options=options)
Exemple #8
0
 def __init__(self):
     options = [
         make_option('--all',
                     action='store_true',
                     default=False,
                     help='display the baselines for *all* tests'),
     ] + platform_options(use_globs=True)
     Command.__init__(self, options=options)
     self._platform_regexp = re.compile(r'platform/([^\/]+)/(.+)')
Exemple #9
0
 def __init__(self):
     options = [
         make_option('--all', action='store_true', default=False,
                     help='display the baselines for *all* tests'),
         make_option('--csv', action='store_true', default=False,
                     help='Print a CSV-style report that includes the port name, test_name, test platform, baseline type, baseline location, and baseline platform'),
     ] + platform_options(use_globs=True)
     Command.__init__(self, options=options)
     self._platform_regexp = re.compile('platform/([^\/]+)/(.+)')
Exemple #10
0
 def __init__(self):
     options = [
         steps.Options.cc,
         steps.Options.component,
         make_option("--no-prompt", action="store_false", dest="prompt", default=True, help="Do not prompt for bug title and comment; use commit log instead."),
         make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review."),
         make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."),
     ]
     Command.__init__(self, options=options)
 def test_parse_required_arguments(self):
     self.assertEqual(Command._parse_required_arguments("ARG1 ARG2"),
                      ["ARG1", "ARG2"])
     self.assertEqual(Command._parse_required_arguments("[ARG1] [ARG2]"),
                      [])
     self.assertEqual(Command._parse_required_arguments("[ARG1] ARG2"),
                      ["ARG2"])
     # Note: We might make our arg parsing smarter in the future and allow this type of arguments string.
     self.assertRaises(Exception, Command._parse_required_arguments,
                       "[ARG1 ARG2]")
Exemple #12
0
 def __init__(self):
     options = [
         make_option("--all", action="store_true",
                     help="Show all bugs regardless of who is on CC (it might take a while)"),
         make_option("--include-cq-denied", action="store_true",
                     help="By default, r? patches with cq- are omitted unless this option is set"),
         make_option("--cc-email",
                     help="Specifies the email on the CC field (defaults to your bugzilla login email)"),
     ]
     Command.__init__(self, options=options)
Exemple #13
0
 def __init__(self):
     options = [
         make_option("--all", action="store_true",
                     help="Show all bugs regardless of who is on CC (it might take a while)"),
         make_option("--include-cq-denied", action="store_true",
                     help="By default, r? patches with cq- are omitted unless this option is set"),
         make_option("--cc-email",
                     help="Specifies the email on the CC field (defaults to your bugzilla login email)"),
     ]
     Command.__init__(self, options=options)
Exemple #14
0
 def __init__(self):
     options = [
         make_option("-b", "--bug-id", action="store", type="string", dest="bug_id", help="Specify bug id if no URL is provided in the commit log."),
         make_option("--add-log-as-comment", action="store_true", dest="add_log_as_comment", default=False, help="Add commit log message as a comment when uploading the patch."),
         make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: description from commit message)"),
         steps.Options.obsolete_patches,
         steps.Options.review,
         steps.Options.request_commit,
     ]
     Command.__init__(self, options=options, requires_local_commits=True)
    def __init__(self):
        options = [
            make_option("--committer-minimum", action="store", dest="committer_minimum", type="int", default=10, help="Specify minimum patch count for Committer nominations."),
            make_option("--reviewer-minimum", action="store", dest="reviewer_minimum", type="int", default=80, help="Specify minimum patch count for Reviewer nominations."),
            make_option("--max-commit-age", action="store", dest="max_commit_age", type="int", default=9, help="Specify max commit age to consider for nominations (in months)."),
            make_option("--show-commits", action="store_true", dest="show_commits", default=False, help="Show commit history with nomination suggestions."),
        ]

        Command.__init__(self, options=options)
        # FIXME: This should probably be on the tool somewhere.
        self._committer_list = CommitterList()
 def __init__(self):
     options = [
         make_option("--httpd-port",
                     action="store",
                     type="int",
                     default=8127,
                     help="Port to use for the HTTP server"),
         make_option(
             "--no-show-results",
             action="store_false",
             default=True,
             dest="show_results",
             help="Don't launch a browser with the rebaseline server"),
     ]
     Command.__init__(self, options=options)
Exemple #17
0
    def __init__(self):
        options = [
            make_option('--all',
                        action='store_true',
                        default=False,
                        help='display the expectations for *all* tests'),
            make_option(
                '-x',
                '--exclude-keyword',
                action='append',
                default=[],
                help=
                'limit to tests not matching the given keyword (for example, "skip", "slow", or "crash". May specify multiple times'
            ),
            make_option(
                '-i',
                '--include-keyword',
                action='append',
                default=[],
                help=
                'limit to tests with the given keyword (for example, "skip", "slow", or "crash". May specify multiple times'
            ),
            make_option(
                '--csv',
                action='store_true',
                default=False,
                help=
                'Print a CSV-style report that includes the port name, modifiers, tests, and expectations'
            ),
            make_option(
                '-f',
                '--full',
                action='store_true',
                default=False,
                help='Print a full TestExpectations-style line for every match'
            ),
            make_option(
                '--paths',
                action='store_true',
                default=False,
                help='display the paths for all applicable expectation files'),
        ] + platform_options(use_globs=True)

        Command.__init__(self, options=options)
        self._expectation_models = {}
Exemple #18
0
    def __init__(self):
        options = [
            make_option('--all', action='store_true', default=False,
                        help='display the expectations for *all* tests'),
            make_option('-x', '--exclude-keyword', action='append', default=[],
                        help='limit to tests not matching the given keyword (for example, "skip", "slow", or "crash". May specify multiple times'),
            make_option('-i', '--include-keyword', action='append', default=[],
                        help='limit to tests with the given keyword (for example, "skip", "slow", or "crash". May specify multiple times'),
            make_option('--csv', action='store_true', default=False,
                        help='Print a CSV-style report that includes the port name, modifiers, tests, and expectations'),
            make_option('-f', '--full', action='store_true', default=False,
                        help='Print a full TestExpectations-style line for every match'),
            make_option('--paths', action='store_true', default=False,
                        help='display the paths for all applicable expectation files'),
        ] + platform_options(use_globs=True)

        Command.__init__(self, options=options)
        self._expectation_models = {}
 def __init__(self, **kwargs):
     Command.__init__(self, **kwargs)
Exemple #20
0
 def __init__(self):
     Command.__init__(self)
     self._re_committed = re.compile(self.commited_pattern)
     self._re_rollout = re.compile(self.rollout_pattern)
     self._omahaproxy = OmahaProxy()
 def __init__(self):
     options = [
         steps.Options.changelog_count,
     ]
     Command.__init__(self, options=options)
 def __init__(self):
     options = [
         make_option("--httpd-port", action="store", type="int", default=8127, help="Port to use for the HTTP server"),
         make_option("--no-show-results", action="store_false", default=True, dest="show_results", help="Don't launch a browser with the rebaseline server"),
     ]
     Command.__init__(self, options=options)
 def __init__(self):
     self._sequence = StepSequence(self.steps)
     Command.__init__(self, self._sequence.options())
Exemple #24
0
 def __init__(self):
     options = [
         make_option("--bugs", action="store_true", dest="bugs", help="Output bug links instead of patch links"),
     ]
     Command.__init__(self, options=options)
Exemple #25
0
 def __init__(self):
     Command.__init__(self)
     self._re_committed = re.compile(self.commited_pattern)
     self._re_rollout = re.compile(self.rollout_pattern)
     self._omahaproxy = OmahaProxy()
Exemple #26
0
 def __init__(self):
     options = [
         steps.Options.changelog_count,
     ]
     Command.__init__(self, options=options)
 def test_parse_required_arguments(self):
     self.assertEqual(Command._parse_required_arguments("ARG1 ARG2"), ["ARG1", "ARG2"])
     self.assertEqual(Command._parse_required_arguments("[ARG1] [ARG2]"), [])
     self.assertEqual(Command._parse_required_arguments("[ARG1] ARG2"), ["ARG2"])
     # Note: We might make our arg parsing smarter in the future and allow this type of arguments string.
     self.assertRaises(Exception, Command._parse_required_arguments, "[ARG1 ARG2]")
Exemple #28
0
 def __init__(self, **kwargs):
     Command.__init__(self, "help text", **kwargs)
     self.execute_count = 0
 def __init__(self):
     self._sequence = StepSequence(self.steps)
     Command.__init__(self, self._sequence.options())
Exemple #30
0
 def __init__(self):
     options = [
         steps.Options.git_commit,
     ]
     Command.__init__(self, options=options)
Exemple #31
0
 def __init__(self, **kwargs):
     Command.__init__(self, "help text", **kwargs)