From a0638eb45b6e98d5027fb088c5b9af572c7f021b Mon Sep 17 00:00:00 2001 From: Matthew G McGovern Date: Tue, 12 Nov 2024 09:08:45 -0800 Subject: [PATCH] TarDownloader: enable skip_old_files option in tar extract --- lisa/tools/tar.py | 1 + microsoft/testsuites/dpdk/common.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lisa/tools/tar.py b/lisa/tools/tar.py index a10ee52ee5..013c26dfbc 100644 --- a/lisa/tools/tar.py +++ b/lisa/tools/tar.py @@ -143,6 +143,7 @@ def extract( gzip: bool = False, sudo: bool = False, raise_error: bool = True, + skip_old_files: bool = False, ) -> None: mkdir = self.node.tools[Mkdir] mkdir.create_directory(dest_dir) diff --git a/microsoft/testsuites/dpdk/common.py b/microsoft/testsuites/dpdk/common.py index 6269925b24..189cf0902e 100644 --- a/microsoft/testsuites/dpdk/common.py +++ b/microsoft/testsuites/dpdk/common.py @@ -152,10 +152,13 @@ def download(self) -> PurePath: self.asset_path = work_path.joinpath(tar_root_folder) # unpack into the dest dir # force name as tarfile name + # add option to skip files which already exist on disk + # in the event we have already extracted this specific tar node.tools[Tar].extract( file=str(remote_path), dest_dir=str(work_path), gzip=True, + skip_old_files=True, ) return self.asset_path