def main(argv, stdout, stderr): # This is a copy of serve.py main function, except for the wait step config = WebPlatformTestServer.load_config("config.default.json", "config.json") WebPlatformTestServer.setup_logger(config["log_level"]) ssl_env = WebPlatformTestServer.get_ssl_environment(config) logged_servers = [] with WebPlatformTestServer.get_ssl_environment(config) as ssl_env: config_, started_servers = WebPlatformTestServer.start(config, ssl_env) for protocol, servers in started_servers.items(): for port, process in servers: logged_servers.append({ "protocol": protocol, "port": port, "pid": process.proc.pid }) logger.info("%s, port:%d, pid:%d" % (protocol, port, process.proc.pid)) # Write pids in a file in case abrupt shutdown is needed with open(argv[0], "wb") as servers_file: json.dump(logged_servers, servers_file) sys.stdin.read(1)
def __enter__(self): self.copy_required_files() self.setup_server_logging() self.setup_routes() self.config = self.load_config() serve.set_computed_defaults(self.config) self.external_config, self.servers = serve.start(self.config) return self
def __enter__(self): self.copy_required_files() config = self.load_config() serve.set_computed_defaults(config) serve.logger = serve.default_logger("info") self.config, self.servers = serve.start(config) return self
def __enter__(self): self.copy_required_files() self.config = self.load_config() serve.set_computed_defaults(self.config) serve.logger = serve.default_logger("info") self.external_config, self.servers = serve.start(self.config) return self
def main(argv, stdout, stderr): # This is a copy of serve.py main function, except for the wait step config = WebPlatformTestServer.load_config("config.default.json", "config.json") WebPlatformTestServer.setup_logger(config["log_level"]) ssl_env = WebPlatformTestServer.get_ssl_environment(config) with WebPlatformTestServer.get_ssl_environment(config) as ssl_env: config_, started_servers = WebPlatformTestServer.start(config, ssl_env) for protocol, servers in started_servers.items(): for port, process in servers: logger.info("%s, port:%d, pid:%d" % (protocol, port, process.proc.pid)) sys.stdin.read(1)
def main(argv, stdout, stderr): # This is a copy of serve.py main function, except for the wait step config = WebPlatformTestServer.load_config("config.default.json", "config.json") WebPlatformTestServer.setup_logger(config["log_level"]) ssl_env = WebPlatformTestServer.get_ssl_environment(config) logged_servers = [] with WebPlatformTestServer.get_ssl_environment(config) as ssl_env: config_, started_servers = WebPlatformTestServer.start(config, ssl_env) for protocol, servers in started_servers.items(): for port, process in servers: logged_servers.append({"protocol": protocol, "port": port, "pid": process.proc.pid}) logger.info("%s, port:%d, pid:%d" % (protocol, port, process.proc.pid)) # Write pids in a file in case abrupt shutdown is needed with open(argv[0], "wb") as servers_file: json.dump(logged_servers, servers_file) sys.stdin.read(1)
def start_fixture_servers(self): root = self.server_root or os.path.join(os.path.dirname(here), "www") if self.appName == "fennec": return serve.start(root, host=moznetwork.get_ip()) else: return serve.start(root)
def start_fixture_servers(self): root = self.server_root or os.path.join(os.path.dirname(here), "www") return serve.start(root)
def __enter__(self): with open(self.config_path) as f: config = json.load(f) serve.logger = serve.default_logger("info") self.config, self.servers = serve.start(config) return self