def __call__(self, parser, namespace, values, option_string=None): for name in FC_REGISTRY.names(): print("%s:" % name) klass = FC_REGISTRY.get(name) for btype in klass.BUILD_TYPES: print(" %s" % btype.replace('-', ',')) parser.exit()
def __call__(self, parser, namespace, values, option_string=None): for name in FC_REGISTRY.names(): print("%s:" % name) klass = FC_REGISTRY.get(name) for btype in klass.BUILD_TYPES: print(" %s" % btype) parser.exit()
def _set_fetch_config(self, index): app_name = str(self.ui.app_combo.currentText()) bits = int(self.ui.bits_combo.currentText()) self.fetch_config = create_config(app_name, mozinfo.os, bits) self.build_type_model = QStringListModel( [i for i in REGISTRY.get(app_name).BUILD_TYPES]) self.ui.build_type.setModel(self.build_type_model) if not self.fetch_config.available_bits(): self.ui.bits_combo.hide() self.ui.label_4.hide() else: self.ui.bits_combo.show() self.ui.label_4.show()
def _set_fetch_config(self, index): app_name = str(self.ui.app_combo.currentText()) bits = int(self.ui.bits_combo.currentText()) self.fetch_config = create_config(app_name, mozinfo.os, bits) self.build_type_model = QStringListModel( [i for i in REGISTRY.get(app_name).BUILD_TYPES]) self.ui.build_type.setModel(self.build_type_model) if not self.fetch_config.available_bits(): self.ui.bits_combo.hide() self.ui.label_4.hide() else: self.ui.bits_combo.show() self.ui.label_4.show()
def initializePage(self): WizardSelectionRangePage.initializePage(self) application_name = self.field("application").toPyObject() self.build_type_model = QStringListModel([i for i in REGISTRY.get(str(application_name)).BUILD_TYPES]) self.ui.build_type.setModel(self.build_type_model)
def create_parser(defaults): """ Create the mozregression command line parser (ArgumentParser instance). """ usage = ("\n" " %(prog)s [OPTIONS]" " [[--bad BAD_DATE]|[--bad-release BAD_RELEASE]]" " [[--good GOOD_DATE]|[--good-release GOOD_RELEASE]]" "\n" " %(prog)s [OPTIONS]" " --bad-rev BAD_REV --good-rev GOOD_REV" "\n" " %(prog)s [OPTIONS] --launch DATE_OR_REV" "\n" " %(prog)s --list-releases" "\n" " %(prog)s --write-conf") parser = ArgumentParser(usage=usage) parser.add_argument("--version", action="version", version=__version__, help=("print the mozregression version number and" " exits.")) parser.add_argument("-b", "--bad", metavar="YYYY-MM-DD", dest="bad_date", help=("first known bad nightly build, default is" " today.")) parser.add_argument("-g", "--good", metavar="YYYY-MM-DD", dest="good_date", help="last known good nightly build.") parser.add_argument("--list-releases", action=ListReleasesAction, help="list all known releases and exit") parser.add_argument("--bad-release", type=int, help=("first known bad nightly build. This option" " is incompatible with --bad.")) parser.add_argument("--good-release", type=int, help=("last known good nightly build. This option is" " incompatible with --good.")) parser.add_argument("--bad-rev", dest="first_bad_revision", help=("first known bad revision (for inbound" " bisection).")) parser.add_argument("--good-rev", dest="last_good_revision", help=("last known good revision (for inbound" " bisection).")) parser.add_argument("--build-type", choices=FC_REGISTRY.get('firefox').BUILD_TYPES, default=defaults["build-type"], help=("Build flavor. Note that on nightly, only opt" " is available most of the time. Defaults to" " %(default)s.")) parser.add_argument("--taskcluster", help=("the Taskcluster build product/name/type," " such as 'b2g.aries-opt'")) parser.add_argument("--artifact-name", help=("the Taskcluster artifact name to look" " for, such as 'aries.zip'")) parser.add_argument("--find-fix", action="store_true", help="Search for a bug fix instead of a regression.") parser.add_argument("-e", "--addon", dest="addons", action='append', default=[], metavar="PATH1", help="addon to install; repeat for multiple addons.") parser.add_argument("-p", "--profile", default=defaults["profile"], metavar="PATH", help="profile to use with nightlies.") parser.add_argument('--profile-persistence', choices=('clone', 'clone-first', 'reuse'), default=defaults["profile-persistence"], help=("Persistence of the used profile. Before" " each tested build, a profile is used. If" " the value of this option is 'clone', each" " test uses a fresh clone. If the value is" " 'clone-first', the profile is cloned once" " then reused for all builds during the " " bisection. If the value is 'reuse', the given" " profile is directly used. Note that the" " profile might be modified by mozregression." " Defaults to %(default)s.")) parser.add_argument("-a", "--arg", dest="cmdargs", action='append', default=[], metavar="ARG1", help=("a command-line argument to pass to the" " application; repeat for multiple arguments.")) parser.add_argument('--pref', nargs='*', dest='prefs', help=(" A preference to set. Must be a key-value pair" " separated by a ':'. Note that if your" " preference is of type float, you should" " pass it as a string, e.g.:" " --pref \"layers.low-precision-opacity:'0.0'\"" )) parser.add_argument('--preferences', nargs="*", dest='prefs_files', help=("read preferences from a JSON or INI file. For" " INI, use 'file.ini:section' to specify a" " particular section.")) parser.add_argument("-n", "--app", choices=FC_REGISTRY.names(), default=defaults["app"], help="application name. Default: %(default)s.") parser.add_argument("--repo", metavar="[mozilla-aurora|mozilla-beta|...]", default=defaults["repo"], help="repository name used for nightly hunting.") parser.add_argument("--inbound-branch", metavar="[b2g-inbound|fx-team|...]", default=defaults["inbound-branch"], help="inbound branch name on archive.mozilla.org.") parser.add_argument("--bits", choices=("32", "64"), default=defaults["bits"], help=("force 32 or 64 bit version (only applies to" " x86_64 boxes). Default: %s bits." % defaults["bits"] or mozinfo.bits)) parser.add_argument("-c", "--command", help=("Test command to evaluate builds automatically." " A return code of 0 will evaluate build as" " good, any other value will evaluate the build" " as bad.")) parser.add_argument("--persist", default=defaults["persist"], help=("the directory in which downloaded files are" " to persist. Defaults to %(default)r.")) parser.add_argument('--persist-size-limit', type=float, default=defaults['persist-size-limit'], help=("Size limit for the persist directory in" " gigabytes (GiB). When the limit is reached," " old builds are removed. 0 means no limit. Note" " that at least 5 build files are kept," " regardless of this value." " Defaults to %(default)s.")) parser.add_argument('--http-timeout', type=float, default=float(defaults['http-timeout']), help=("Timeout in seconds to abort requests when there" " is no activity from the server. Default to" " %(default)s seconds - increase this if you" " are under a really slow network.")) parser.add_argument('--no-background-dl', action='store_false', dest="background_dl", default=(defaults['no-background-dl'].lower() not in ('1', 'yes', 'true')), help=("Do not download next builds in the background" " while evaluating the current build.")) parser.add_argument('--background-dl-policy', choices=('cancel', 'keep'), default=defaults['background-dl-policy'], help=('Policy to use for background downloads.' ' Possible values are "cancel" to cancel all' ' pending background downloads or "keep" to keep' ' downloading them when persist mode is enabled.' ' The default is %(default)s.')) parser.add_argument('--launch', metavar="DATE_OR_REV", help="Launch only one specific build by date (nightly)" " or changeset (inbound).") parser.add_argument('--write-config', action=WriteConfigAction, help="Helps to write the configuration file.") commandline.add_logging_group( parser, include_formatters=commandline.TEXT_FORMATTERS ) return parser