def run_marionette(tests, b2g_path=None, emulator=None, testtype=None, address=None, bin=None, topsrcdir=None): from marionette.runtests import ( MarionetteTestRunner, BaseMarionetteOptions, startTestRunner ) parser = BaseMarionetteOptions() options, args = parser.parse_args() if not tests: tests = [os.path.join(topsrcdir, 'testing/marionette/client/marionette/tests/unit-tests.ini')] options.type = testtype if b2g_path: options.homedir = b2g_path if emulator: options.emulator = emulator else: options.bin = bin path, exe = os.path.split(options.bin) options.address = address parser.verify_usage(options, tests) runner = startTestRunner(MarionetteTestRunner, options, tests) if runner.failed > 0: return 1 return 0
def run_marionette(tests, b2g_path=None, emulator=None, testtype=None, address=None, binary=None, topsrcdir=None, **kwargs): from marionette.runtests import (MarionetteTestRunner, BaseMarionetteOptions, startTestRunner) parser = BaseMarionetteOptions() commandline.add_logging_group(parser) options, args = parser.parse_args() if not tests: tests = [ os.path.join( topsrcdir, 'testing/marionette/client/marionette/tests/unit-tests.ini') ] if b2g_path: options.homedir = b2g_path if emulator: options.emulator = emulator else: options.binary = binary path, exe = os.path.split(options.binary) for k, v in kwargs.iteritems(): setattr(options, k, v) parser.verify_usage(options, tests) options.logger = commandline.setup_logging("Marionette Unit Tests", options, {"mach": sys.stdout}) runner = startTestRunner(MarionetteTestRunner, options, tests) if runner.failed > 0: return 1 return 0
def run_marionette(tests, b2g_path=None, emulator=None, testtype=None, address=None, binary=None, topsrcdir=None, **kwargs): from marionette.runtests import ( MarionetteTestRunner, BaseMarionetteOptions, startTestRunner ) parser = BaseMarionetteOptions() commandline.add_logging_group(parser) options, args = parser.parse_args() if not tests: tests = [os.path.join(topsrcdir, 'testing/marionette/client/marionette/tests/unit-tests.ini')] if b2g_path: options.homedir = b2g_path if emulator: options.emulator = emulator else: options.binary = binary path, exe = os.path.split(options.binary) for k, v in kwargs.iteritems(): setattr(options, k, v) parser.verify_usage(options, tests) options.logger = commandline.setup_logging("Marionette Unit Tests", options, {"mach": sys.stdout}) runner = startTestRunner(MarionetteTestRunner, options, tests) if runner.failed > 0: return 1 return 0