Example #1
0
def main():
    parser = parser_b2g()
    options = parser.parse_args()
    log = commandline.setup_logging("Remote XPCShell",
                                    options,
                                    {"tbpl": sys.stdout})
    run_remote_xpcshell(parser, options, log)
Example #2
0
def main():
    parser = parser_b2g()
    commandline.add_logging_group(parser)
    options = parser.parse_args()
    log = commandline.setup_logging("Remote XPCShell", options,
                                    {"tbpl": sys.stdout})
    run_remote_xpcshell(parser, options, log)
Example #3
0
def get_parser():
    build_obj = MozbuildObject.from_environment(cwd=here)
    if conditions.is_android(build_obj):
        return parser_remote()
    elif conditions.is_b2g(build_obj):
        return parser_b2g()
    else:
        return parser_desktop()
Example #4
0
def get_parser():
    build_obj = MozbuildObject.from_environment(cwd=here)
    if conditions.is_android(build_obj):
        return parser_remote()
    elif conditions.is_b2g(build_obj):
        return parser_b2g()
    else:
        return parser_desktop()
Example #5
0
    def run_test(self, **kwargs):
        try:
            import which
            which.which('adb')
        except which.WhichError:
            # TODO Find adb automatically if it isn't on the path
            print(ADB_NOT_FOUND % ('mochitest-remote', kwargs["b2g_home"]))
            sys.exit(1)

        import runtestsb2g

        log = kwargs.pop("log")
        self.log_manager.enable_unstructured()

        if kwargs["device_name"].startswith(
                'emulator') and 'x86' in kwargs["device_name"]:
            kwargs["emulator"] = 'x86'

        if kwargs["xpcshell"] is None:
            kwargs["xpcshell"] = "xpcshell"
        if kwargs["b2g_path"] is None:
            kwargs["b2g_path"] = kwargs["b2g_home"]
        if kwargs["busybox"] is None:
            kwargs["busybox"] = os.environ.get('BUSYBOX')
        if kwargs["busybox"] is None:
            kwargs["busybox"] = self._download_busybox(kwargs["b2g_home"],
                                                       kwargs["emulator"])

        if kwargs["localLib"] is None:
            kwargs["localLib"] = self.bin_dir
        if kwargs["localBin"] is None:
            kwargs["localBin"] = self.bin_dir
        if kwargs["logdir"] is None:
            kwargs["logdir"] = self.xpcshell_dir
        if kwargs["manifest"] is None:
            kwargs["manifest"] = os.path.join(self.xpcshell_dir,
                                              'xpcshell.ini')
        if kwargs["mozInfo"] is None:
            kwargs["mozInfo"] = os.path.join(self.topobjdir, 'mozinfo.json')
        if kwargs["objdir"] is None:
            kwargs["objdir"] = self.topobjdir
        if kwargs["symbolsPath"] is None:
            kwargs["symbolsPath"] = os.path.join(self.distdir,
                                                 'crashreporter-symbols')
        if kwargs["testingModulesDir"] is None:
            kwargs["testingModulesDir"] = os.path.join(self.tests_dir,
                                                       'modules')
        if kwargs["use_device_libs"] is None:
            kwargs["use_device_libs"] = True

        parser = parser_b2g()
        options = argparse.Namespace(**kwargs)
        rv = runtestsb2g.run_remote_xpcshell(parser, options, log)

        self.log_manager.disable_unstructured()
        return rv
Example #6
0
    def run_test(self, **kwargs):
        try:
            import which
            which.which('adb')
        except which.WhichError:
            # TODO Find adb automatically if it isn't on the path
            print(ADB_NOT_FOUND % ('mochitest-remote', kwargs["b2g_home"]))
            sys.exit(1)

        import runtestsb2g

        log = kwargs.pop("log")
        self.log_manager.enable_unstructured()

        if kwargs["xpcshell"] is None:
            kwargs["xpcshell"] = "xpcshell"
        if kwargs["b2g_path"] is None:
            kwargs["b2g_path"] = kwargs["b2g_home"]
        if kwargs["busybox"] is None:
            kwargs["busybox"] = os.environ.get('BUSYBOX')
        if kwargs["busybox"] is None:
            kwargs["busybox"] = self._download_busybox(kwargs["b2g_home"], kwargs["emulator"])

        if kwargs["localLib"] is None:
            kwargs["localLib"] = self.bin_dir
        if kwargs["localBin"] is None:
            kwargs["localBin"] = self.bin_dir
        if kwargs["logdir"] is None:
            kwargs["logdir"] = self.xpcshell_dir
        if kwargs["manifest"] is None:
            kwargs["manifest"] = os.path.join(self.xpcshell_dir, 'xpcshell.ini')
        if kwargs["mozInfo"] is None:
            kwargs["mozInfo"] = os.path.join(self.topobjdir, 'mozinfo.json')
        if kwargs["objdir"] is None:
            kwargs["objdir"] = self.topobjdir
        if kwargs["symbolsPath"] is None:
            kwargs["symbolsPath"] = os.path.join(self.distdir, 'crashreporter-symbols')
        if kwargs["testingModulesDir"] is None:
            kwargs["testingModulesDir"] = os.path.join(self.tests_dir, 'modules')
        if kwargs["use_device_libs"] is None:
            kwargs["use_device_libs"] = True

        if kwargs["device_name"].startswith('emulator') and 'x86' in kwargs["device_name"]:
            kwargs["emulator"] = 'x86'

        parser = parser_b2g()
        options = argparse.Namespace(**kwargs)
        rv = runtestsb2g.run_remote_xpcshell(parser, options, log)

        self.log_manager.disable_unstructured()
        return rv