def run(self): # We need to create a new Host object here because this is # running in a new process and we can't require the parent's # Host to be pickleable and passed to the child. if self._platform_name.startswith('test'): host = MockHost() else: host = Host() host._initialize_scm() options = self._options port_obj = host.port_factory.get(self._platform_name, options) # The unix multiprocessing implementation clones the # log handler configuration into the child processes, # but the win implementation doesn't. configure_logging = (sys.platform == 'win32') # FIXME: this won't work if the calling process is logging # somewhere other than sys.stderr and sys.stdout, but I'm not sure # if this will be an issue in practice. printer = printing.Printer(port_obj, options, sys.stderr, sys.stdout, configure_logging) self._client.run(port_obj) printer.cleanup()
def main(): options, args = parse_args() if options.platform and options.platform.startswith('test'): # It's a bit lame to import mocks into real code, but this allows the user # to run tests against the test platform interactively, which is useful for # debugging test failures. from webkitpy.common.host_mock import MockHost host = MockHost() else: host = Host() host._initialize_scm() port = host.port_factory.get(options.platform, options) return run(port, options, args)
def main(): options, args = parse_args() if options.platform and options.platform.startswith('test'): # It's a bit lame to import mocks into real code, but this allows the user # to run tests against the test platform interactively, which is useful for # debugging test failures. from webkitpy.common.host_mock import MockHost host = MockHost() else: host = Host() host._initialize_scm() port = host.port_factory.get(options.platform, options) return run(port, options, args)
def main(): options, args = parse_args() if options.platform and 'test' in options.platform: # It's a bit lame to import mocks into real code, but this allows the user # to run tests against the test platform interactively, which is useful for # debugging test failures. from webkitpy.common.host_mock import MockHost host = MockHost() else: host = Host() host._initialize_scm() port = host.port_factory.get(options.platform, options) logging.getLogger().setLevel(logging.DEBUG if options.verbose else logging.INFO) return run(port, options, args)
def main(): options, args = parse_args() if options.platform and 'test' in options.platform: # It's a bit lame to import mocks into real code, but this allows the user # to run tests against the test platform interactively, which is useful for # debugging test failures. from webkitpy.common.host_mock import MockHost host = MockHost() else: host = Host() host._initialize_scm() port = host.port_factory.get(options.platform, options) logging.getLogger().setLevel( logging.DEBUG if options.verbose else logging.INFO) return run(port, options, args)
def run(self): # We need to create a new Host object here because this is # running in a new process and we can't require the parent's # Host to be pickleable and passed to the child. if self._platform_name.startswith('test'): host = MockHost() else: host = Host() host._initialize_scm() options = self._options port_obj = host.port_factory.get(self._platform_name, options) # The unix multiprocessing implementation clones the # log handler configuration into the child processes, # but the win implementation doesn't. configure_logging = (sys.platform == 'win32') # FIXME: this won't work if the calling process is logging # somewhere other than sys.stderr and sys.stdout, but I'm not sure # if this will be an issue in practice. printer = printing.Printer(port_obj, options, sys.stderr, sys.stdout, configure_logging) self._client.run(port_obj) printer.cleanup()