diff options
author | Zachary Turner <zturner@google.com> | 2015-11-24 21:35:50 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-11-24 21:35:50 +0000 |
commit | 9befc01064c2ef73e3764b15426dce82dc5fbe52 (patch) | |
tree | ec32dd89dc690d1e1a5ed06416558b4e36f2755e /lldb/scripts/swig_bot_lib/server.py | |
parent | cc3609362eca771104bc46bb9eb3d0a0846f2675 (diff) | |
download | bcm5719-llvm-9befc01064c2ef73e3764b15426dce82dc5fbe52.tar.gz bcm5719-llvm-9befc01064c2ef73e3764b15426dce82dc5fbe52.zip |
Include config settings in the archive, and extract on the remote.
llvm-svn: 254025
Diffstat (limited to 'lldb/scripts/swig_bot_lib/server.py')
-rw-r--r-- | lldb/scripts/swig_bot_lib/server.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lldb/scripts/swig_bot_lib/server.py b/lldb/scripts/swig_bot_lib/server.py index 0751ce8a29a..b973ca9bcf1 100644 --- a/lldb/scripts/swig_bot_lib/server.py +++ b/lldb/scripts/swig_bot_lib/server.py @@ -14,9 +14,11 @@ import argparse import logging import os import select +import shutil import socket import struct import sys +import tempfile import traceback # LLDB modules @@ -68,9 +70,19 @@ def accept_once(sock, options): logging.info("Received {} bytes of data from client" .format(len(data))) - logging.info("Sending {} byte response".format(len(data))) - client.sendall(struct.pack("!I", len(data))) - client.sendall(data) + pack_location = None + try: + pack_location = local.unpack_archive("swig-bot", data) + logging.debug("Successfully unpacked archive...") + + logging.info("Sending {} byte response".format(len(data))) + client.sendall(struct.pack("!I", len(data))) + client.sendall(data) + finally: + if pack_location is not None: + logging.debug("Removing temporary folder {}" + .format(pack_location)) + shutil.rmtree(pack_location) def accept_loop(sock, options): while True: |