mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1127523 - Allow functional tests to be run against any loop-server. r=dmose NPOTB DONTBUILD
This commit is contained in:
parent
0f04c67997
commit
2a43723245
@ -38,12 +38,16 @@ LOOP_SERVER_ENV.update({"NODE_ENV": "dev",
|
||||
|
||||
class LoopTestServers:
|
||||
def __init__(self):
|
||||
self.loop_server = self.start_loop_server()
|
||||
loop_server_location = os.environ.get('LOOP_SERVER')
|
||||
if loop_server_location.startswith("http"):
|
||||
FIREFOX_PREFERENCES["loop.server"] = loop_server_location
|
||||
return
|
||||
|
||||
self.loop_server = self.start_loop_server(loop_server_location)
|
||||
self.content_server = self.start_content_server()
|
||||
|
||||
@staticmethod
|
||||
def start_loop_server():
|
||||
loop_server_location = os.environ.get('LOOP_SERVER')
|
||||
def start_loop_server(loop_server_location):
|
||||
if loop_server_location is None:
|
||||
raise Exception('LOOP_SERVER variable not set')
|
||||
|
||||
@ -68,6 +72,8 @@ class LoopTestServers:
|
||||
return p
|
||||
|
||||
def shutdown(self):
|
||||
if hasattr(self, "content_server"):
|
||||
self.content_server.kill()
|
||||
if hasattr(self, "loop_server"):
|
||||
self.loop_server.kill()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user