Exemplo n.º 1
0
def cli():
    parser = OptionParser()
    parser.add_option("-b", "--bad", dest="bad_date",help="first known bad nightly build, default is today",
                      metavar="YYYY-MM-DD", default=str(datetime.date.today()))
    parser.add_option("-g", "--good", dest="good_date",help="last known good nightly build",
                      metavar="YYYY-MM-DD", default=None)
    parser.add_option("-e", "--addons", dest="addons",help="list of addons to install", metavar="PATH1,PATH2", default="")
    parser.add_option("-p", "--profile", dest="profile", help="profile to use with nightlies", metavar="PATH")
    parser.add_option("-a", "--args", dest="cmdargs", help="command-line arguments to pass to the application",
                      metavar="ARG1,ARG2", default="")
    parser.add_option("-n", "--app", dest="app", help="application name (firefox, fennec or thunderbird)",
                      metavar="[firefox|fennec|thunderbird]", default="firefox")
    parser.add_option("-r", "--repo", dest="repo_name", help="repository name on ftp.mozilla.org",
                      metavar="[tracemonkey|mozilla-1.9.2]", default=None)
    parser.add_option("--bits", dest="bits", help="force 32 or 64 bit version (only applies to x86_64 boxes)",
                      choices=("32","64"), default=mozinfo.bits)
    parser.add_option("--persist", dest="persist", help="the directory in which files are to persist ie. /Users/someuser/Documents")
    (options, args) = parser.parse_args()

    options.bits = parseBits(options.bits)

    addons = strsplit(options.addons, ",")
    cmdargs = strsplit(options.cmdargs, ",")

    if not options.good_date:
        options.good_date = "2009-01-01"
        print "No 'good' date specified, using " + options.good_date

    runner = NightlyRunner(appname=options.app, addons=addons, repo_name=options.repo_name,
                           profile=options.profile, cmdargs=cmdargs, bits=options.bits,
                           persist=options.persist)
    bisector = Bisector(runner, appname=options.app)
    bisector.bisect(get_date(options.good_date), get_date(options.bad_date))
Exemplo n.º 2
0
def cli(args=sys.argv[1:]):

    parser = OptionParser()
    parser.add_option("--timestamp", dest="timestamp", help="timestamp of "
                      "inbound build")
    parser.add_option("-a", "--addons", dest="addons",
                      help="list of addons to install",
                      metavar="PATH1,PATH2")
    parser.add_option("-p", "--profile", dest="profile", help="path to profile to user", metavar="PATH")
    parser.add_option("--bits", dest="bits", help="force 32 or 64 bit version (only applies to x86_64 boxes)",
                      choices=("32","64"), default=mozinfo.bits)
    parser.add_option("--persist", dest="persist", help="the directory in which files are to persist ie. /Users/someuser/Documents")

    options, args = parser.parse_args(args)
    if not options.timestamp:
        print "timestamp must be specified"
        sys.exit(1)
    options.bits = parseBits(options.bits)
    # XXX https://github.com/mozilla/mozregression/issues/50
    addons = strsplit(options.addons or "", ",")
    runner = InboundRunner(addons=addons, profile=options.profile,
                           bits=options.bits, persist=options.persist)
    runner.start(get_date(options.date))
    try:
        runner.wait()
    except KeyboardInterrupt:
        runner.stop()
Exemplo n.º 3
0
def cli():
    parser = OptionParser()
    parser.add_option("-b", "--bad", dest="bad_date",help="first known bad nightly build, default is today",
                      metavar="YYYY-MM-DD", default=str(datetime.date.today()))
    parser.add_option("-g", "--good", dest="good_date",help="last known good nightly build",
                      metavar="YYYY-MM-DD", default=None)
    parser.add_option("-e", "--addons", dest="addons",help="list of addons to install", metavar="PATH1,PATH2", default="")
    parser.add_option("-p", "--profile", dest="profile", help="profile to use with nightlies", metavar="PATH")
    parser.add_option("-a", "--args", dest="cmdargs", help="command-line arguments to pass to the application",
                      metavar="ARG1,ARG2", default="")
    parser.add_option("-n", "--app", dest="app", help="application name (firefox, fennec or thunderbird)",
                      metavar="[firefox|fennec|thunderbird]", default="firefox")
    parser.add_option("-r", "--repo", dest="repo_name", help="repository name on ftp.mozilla.org",
                      metavar="[tracemonkey|mozilla-1.9.2]", default=None)
    parser.add_option("--bits", dest="bits", help="force 32 or 64 bit version (only applies to x86_64 boxes)",
                      choices=("32","64"), default=mozinfo.bits)
    parser.add_option("--persist", dest="persist", help="the directory in which files are to persist ie. /Users/someuser/Documents")
    parser.add_option("--inbound", action="store_true", dest="inbound", help="use inbound instead of nightlies (use --good-rev and --bad-rev options")
    parser.add_option("--bad-rev", dest="firstBadRevision",help="first known bad revision (use with --inbound)")
    parser.add_option("--good-rev", dest="lastGoodRevision",help="last known good revision (use with --inbound)")

    (options, args) = parser.parse_args()

    options.bits = parseBits(options.bits)

    addons = strsplit(options.addons, ",")
    cmdargs = strsplit(options.cmdargs, ",")

    inboundRunner = None
    if options.app == "firefox" or options.app == "fennec":
        inboundRunner = InboundRunner(appname=options.app,
                                      addons=addons,
                                      repo_name=options.repo_name,
                                      profile=options.profile,
                                      cmdargs=cmdargs, bits=options.bits,
                                      persist=options.persist)

    if options.inbound:
        if not options.lastGoodRevision or not options.firstBadRevision:
            print "If bisecting inbound, both --good-rev and --bad-rev " \
                " must be set"
            sys.exit(1)
        bisector = Bisector(None, inboundRunner, appname=options.app,
                            lastGoodRevision=options.lastGoodRevision,
                            firstBadRevision=options.firstBadRevision)
        bisector.bisect_inbound()
    else:
        if not options.good_date:
            options.good_date = "2009-01-01"
            print "No 'good' date specified, using " + options.good_date
        nightlyRunner = NightlyRunner(appname=options.app, addons=addons,
                                      repo_name=options.repo_name,
                                      profile=options.profile, cmdargs=cmdargs,
                                      bits=options.bits,
                                      persist=options.persist)
        bisector = Bisector(nightlyRunner, inboundRunner, appname=options.app)
        bisector.bisect_nightlies(get_date(options.good_date),
                                  get_date(options.bad_date))
Exemplo n.º 4
0
def cli():
    parser = OptionParser()
    parser.add_option("-b",
                      "--bad",
                      dest="bad_date",
                      help="first known bad nightly build, default is today",
                      metavar="YYYY-MM-DD",
                      default=str(datetime.date.today()))
    parser.add_option("-g",
                      "--good",
                      dest="good_date",
                      help="last known good nightly build",
                      metavar="YYYY-MM-DD",
                      default=None)
    parser.add_option("-e",
                      "--addons",
                      dest="addons",
                      help="list of addons to install",
                      metavar="PATH1,PATH2",
                      default="")
    parser.add_option("-p",
                      "--profile",
                      dest="profile",
                      help="profile to use with nightlies",
                      metavar="PATH")
    parser.add_option("-a",
                      "--args",
                      dest="cmdargs",
                      help="command-line arguments to pass to the application",
                      metavar="ARG1,ARG2",
                      default="")
    parser.add_option("-n",
                      "--app",
                      dest="app",
                      help="application name (firefox, fennec or thunderbird)",
                      metavar="[firefox|fennec|thunderbird]",
                      default="firefox")
    parser.add_option("-r",
                      "--repo",
                      dest="repo_name",
                      help="repository name on ftp.mozilla.org",
                      metavar="[tracemonkey|mozilla-1.9.2]",
                      default=None)
    parser.add_option(
        "--bits",
        dest="bits",
        help="force 32 or 64 bit version (only applies to x86_64 boxes)",
        choices=("32", "64"),
        default=mozinfo.bits)
    parser.add_option(
        "--persist",
        dest="persist",
        help=
        "the directory in which files are to persist ie. /Users/someuser/Documents"
    )
    (options, args) = parser.parse_args()

    options.bits = parseBits(options.bits)

    addons = strsplit(options.addons, ",")
    cmdargs = strsplit(options.cmdargs, ",")

    if not options.good_date:
        options.good_date = "2009-01-01"
        print "No 'good' date specified, using " + options.good_date

    runner = NightlyRunner(appname=options.app,
                           addons=addons,
                           repo_name=options.repo_name,
                           profile=options.profile,
                           cmdargs=cmdargs,
                           bits=options.bits,
                           persist=options.persist)
    bisector = Bisector(runner, appname=options.app)
    bisector.bisect(get_date(options.good_date), get_date(options.bad_date))