Change ExtractTarball to use existing compression helpers.
This has the side-effect of enabling parallel decompression in some
cases.
This reduces the runtime of cros flash by 70 seconds on my machine.
BUG=chromium:1141320
TEST=cros flash
TEST=./chromite/run_pytest
Change-Id: I19d8dff5bdc0c312692c912ce6e0141f680c4f2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2491620
Commit-Queue: Eliot Courtney <edcourtney@chromium.org>
Tested-by: Eliot Courtney <edcourtney@chromium.org>
Reviewed-by: Stephane Belmon <sbelmon@google.com>
diff --git a/scripts/cros_generate_tidy_warnings.py b/scripts/cros_generate_tidy_warnings.py
index 34d4995..a2b50a0 100644
--- a/scripts/cros_generate_tidy_warnings.py
+++ b/scripts/cros_generate_tidy_warnings.py
@@ -74,8 +74,8 @@
shutil.copy2(f, self.warnings_dir)
def _CreateTarball(self):
- target = os.path.join(self.options.out_dir, self.options.out_file)
- cros_build_lib.CreateTarball(target, self.warnings_dir, sudo=True)
+ tarball_path = os.path.join(self.options.out_dir, self.options.out_file)
+ cros_build_lib.CreateTarball(tarball_path, self.warnings_dir, sudo=True)
def Perform(self):
"""Generate the warnings files."""