diff options
Diffstat (limited to 'scripts/swig_bot_lib/local.py')
-rw-r--r-- | scripts/swig_bot_lib/local.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/swig_bot_lib/local.py b/scripts/swig_bot_lib/local.py index 7cca0b3cabbb..b26ea2f53ead 100644 --- a/scripts/swig_bot_lib/local.py +++ b/scripts/swig_bot_lib/local.py @@ -26,12 +26,14 @@ import use_lldb_suite # Package imports from lldbsuite.support import fs + class LocalConfig(object): src_root = None target_dir = None languages = None swig_executable = None + def pack_archive(bytes_io, src_root, filters): logging.info("Creating input file package...") zip_file = None @@ -53,9 +55,9 @@ def pack_archive(bytes_io, src_root, filters): candidates = [os.path.normpath(os.path.join(full_path, f)) for f in os.listdir(full_path)] actual = filter( - lambda f : os.path.isfile(f) and os.path.splitext(f)[1] == ext, + lambda f: os.path.isfile(f) and os.path.splitext(f)[1] == ext, candidates) - return (subfolder, map(lambda f : os.path.basename(f), actual)) + return (subfolder, map(lambda f: os.path.basename(f), actual)) archive_entries = map(filter_func, filters) else: for (root, dirs, files) in os.walk(src_root): @@ -77,6 +79,7 @@ def pack_archive(bytes_io, src_root, filters): return zip_file + def unpack_archive(folder, archive_bytes): zip_data = io.BytesIO(archive_bytes) logging.debug("Opening zip archive...") @@ -84,6 +87,7 @@ def unpack_archive(folder, archive_bytes): zip_file.extractall(folder) zip_file.close() + def generate(options): include_folder = os.path.join(options.src_root, "include") in_file = os.path.join(options.src_root, "scripts", "lldb.swig") @@ -128,4 +132,4 @@ def generate(options): logging.error("An error occurred executing swig. returncode={}" .format(e.returncode)) logging.error(e.output) - return (e.returncode, e.output)
\ No newline at end of file + return (e.returncode, e.output) |