def main(): parser = MochitestArgumentParser(app='b2g') options = parser.parse_args() if options.desktop: return run_desktop_mochitests(options) else: return run_remote_mochitests(options)
def setup_argument_parser(): build_obj = MozbuildObject.from_environment(cwd=here) build_path = os.path.join(build_obj.topobjdir, 'build') if build_path not in sys.path: sys.path.append(build_path) mochitest_dir = os.path.join(build_obj.topobjdir, '_tests', 'testing', 'mochitest') with warnings.catch_warnings(): warnings.simplefilter('ignore') import imp path = os.path.join(build_obj.topobjdir, mochitest_dir, 'runtests.py') if not os.path.exists(path): path = os.path.join(here, "runtests.py") with open(path, 'r') as fh: imp.load_module('mochitest', fh, path, ('.py', 'r', imp.PY_SOURCE)) from mochitest_options import MochitestArgumentParser if conditions.is_android(build_obj): # On Android, check for a connected device (and offer to start an # emulator if appropriate) before running tests. This check must # be done in this admittedly awkward place because # MochitestArgumentParser initialization fails if no device is found. from mozrunner.devices.android_device import verify_android_device # verify device and xre verify_android_device(build_obj, install=False, xre=True) global parser parser = MochitestArgumentParser() return parser
def setup_mochitest_argument_parser(): import mozinfo mozinfo.find_and_update_from_json(here) app = 'generic' if mozinfo.info.get('buildapp') == 'mobile/android': app = 'android' from mochitest_options import MochitestArgumentParser global parser parser = MochitestArgumentParser(app=app) return parser
def setup_mochitest_argument_parser(): import mozinfo mozinfo.find_and_update_from_json(here) app = "generic" if mozinfo.info.get("buildapp") == "mobile/android": app = "android" from mochitest_options import MochitestArgumentParser global parser parser = MochitestArgumentParser(app=app) add_global_arguments(parser) return parser
def setup_argument_parser(): build_obj = MozbuildObject.from_environment(cwd=here) build_path = os.path.join(build_obj.topobjdir, 'build') if build_path not in sys.path: sys.path.append(build_path) mochitest_dir = os.path.join(build_obj.topobjdir, '_tests', 'testing', 'mochitest') with warnings.catch_warnings(): warnings.simplefilter('ignore') import imp path = os.path.join(build_obj.topobjdir, mochitest_dir, 'runtests.py') with open(path, 'r') as fh: imp.load_module('mochitest', fh, path, ('.py', 'r', imp.PY_SOURCE)) from mochitest_options import MochitestArgumentParser return MochitestArgumentParser()
def main(args=sys.argv[1:]): parser = MochitestArgumentParser(app='android') options = parser.parse_args(args) return run_test_harness(parser, options)
def main(args=sys.argv[1:]): parser = MochitestArgumentParser(app='android') options = parser.parse_args(args) return run_test_harness(options)
def main(): parser = MochitestArgumentParser(app='b2g') options = parser.parse_args() return run_test_harness(options)
def setup_argument_parser(): from mochitest_options import MochitestArgumentParser return MochitestArgumentParser(app='generic')
def setup_argument_parser(): from mochitest_options import MochitestArgumentParser global parser parser = MochitestArgumentParser(app='generic') return parser