Ejemplo n.º 1
0
    def run(self, **kw):
        os.environ["MANUAL_MACH_RUN"] = "1"
        self._init()

        if kw["firefox"] is None:
            kw["firefox"] = self.get_binary_path()
        from condprof.runner import run

        run(**kw)
Ejemplo n.º 2
0
def main(args=sys.argv[1:]):
    parser = argparse.ArgumentParser(description="Profile Creator")
    parser.add_argument("archive", help="Archives Dir", type=str, default=None)
    parser.add_argument("--firefox", help="Firefox Binary", type=str, default=None)
    parser.add_argument("--scenario", help="Scenario to use", type=str, default="all")
    parser.add_argument(
        "--profile", help="Existing profile Dir", type=str, default=None
    )
    parser.add_argument(
        "--customization", help="Profile customization to use", type=str, default="all"
    )
    parser.add_argument(
        "--visible", help="Don't use headless mode", action="store_true", default=False
    )
    parser.add_argument(
        "--archives-dir", help="Archives local dir", type=str, default="/tmp/archives"
    )
    parser.add_argument(
        "--force-new", help="Create from scratch", action="store_true", default=False
    )
    parser.add_argument(
        "--strict",
        help="Errors out immediatly on a scenario failure",
        action="store_true",
        default=True,
    )
    parser.add_argument(
        "--geckodriver",
        help="Path to the geckodriver binary",
        type=str,
        default=sys.platform.startswith("win") and "geckodriver.exe" or "geckodriver",
    )

    parser.add_argument(
        "--device-name", help="Name of the device", type=str, default=None
    )

    args = parser.parse_args(args=args)
    os.environ["CONDPROF_RUNNER"] = "1"

    from condprof.runner import run  # NOQA

    run(
        args.archive,
        args.firefox,
        args.scenario,
        args.profile,
        args.customization,
        args.visible,
        args.archives_dir,
        args.force_new,
        args.strict,
        args.geckodriver,
        args.device_name,
    )
Ejemplo n.º 3
0
    def run(self, **kw):
        os.environ["MANUAL_MACH_RUN"] = "1"
        self._init()

        if kw["firefox"] is None:
            try:
                kw["firefox"] = self.get_binary_path()
            except BinaryNotFoundException as e:
                self.log(logging.ERROR, 'run-condprofile', {'error': str(e)},
                         'ERROR: {error}')
                self.log(logging.INFO, 'run-condprofile', {'help': e.help()},
                         '{help}')
                return 1

        from condprof.runner import run

        run(**kw)
Ejemplo n.º 4
0
    def run(self, **kw):
        os.environ["MANUAL_MACH_RUN"] = "1"
        self._init()

        if kw["firefox"] is None:
            try:
                kw["firefox"] = self.get_binary_path()
            except BinaryNotFoundException as e:
                self.log(
                    logging.ERROR,
                    "run-condprofile",
                    {"error": str(e)},
                    "ERROR: {error}",
                )
                self.log(logging.INFO, "run-condprofile", {"help": e.help()}, "{help}")
                return 1

        from condprof.runner import run

        run(**kw)