summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/swig_bot_lib/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/swig_bot_lib/server.py')
-rw-r--r--lldb/scripts/swig_bot_lib/server.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/scripts/swig_bot_lib/server.py b/lldb/scripts/swig_bot_lib/server.py
index cc25cee4d4b..57fb8d9db4e 100644
--- a/lldb/scripts/swig_bot_lib/server.py
+++ b/lldb/scripts/swig_bot_lib/server.py
@@ -33,6 +33,7 @@ from . import remote
default_port = 8537
+
def add_subparser_args(parser):
parser.add_argument(
"--port",
@@ -46,9 +47,11 @@ def add_subparser_args(parser):
default=fs.find_executable("swig"),
dest="swig_executable")
+
def finalize_subparser_options(options):
pass
+
def initialize_listening_socket(options):
logging.debug("Creating socket...")
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -60,6 +63,7 @@ def initialize_listening_socket(options):
s.listen()
return s
+
def accept_once(sock, options):
logging.debug("Waiting for connection...")
while True:
@@ -122,6 +126,7 @@ def accept_once(sock, options):
.format(pack_location))
shutil.rmtree(pack_location)
+
def accept_loop(sock, options):
while True:
try:
@@ -131,6 +136,7 @@ def accept_loop(sock, options):
logging.error("An error occurred while processing the connection.")
logging.error(error)
+
def run(options):
print(options)
sock = initialize_listening_socket(options)
OpenPOWER on IntegriCloud