Skip to content

Commit

Permalink
TarDownloader: enable skip_old_files option in tar extract
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgov committed Nov 12, 2024
1 parent 2c8bc82 commit a0638eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lisa/tools/tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions microsoft/testsuites/dpdk/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a0638eb

Please sign in to comment.