55from typing import Any , Callable , Dict , List , Optional , Sequence , Type , Union
66from urllib .parse import urlparse
77
8- from assertpy import assert_that
8+ from assertpy import assert_that , fail
99from semver import VersionInfo
1010from urllib3 .util .url import parse_url
1111
1212from lisa import Node
13- from lisa .executable import Tool
13+ from lisa .executable import ExecutableResult , Tool
1414from lisa .operating_system import Debian , Fedora , Oracle , Posix , Suse , Ubuntu
1515from lisa .tools import Git , Lscpu , Tar , Wget
1616from lisa .tools .lscpu import CpuArchitecture
@@ -99,9 +99,10 @@ def download(self) -> PurePath:
9999 # NOTE: fail on exists is set to True.
100100 # The expectation is that the parent Installer class should
101101 # remove any lingering installations
102+ work_path = self ._node .get_working_path_with_required_space (5 )
102103 self .asset_path = self ._node .tools [Git ].clone (
103104 self ._git_repo ,
104- cwd = self ._node .get_working_path ( ),
105+ cwd = self ._node .get_pure_path ( work_path ),
105106 ref = self ._git_ref ,
106107 fail_on_exists = False ,
107108 )
@@ -123,7 +124,9 @@ def __init__(
123124 # then extract it
124125 def download (self ) -> PurePath :
125126 node = self ._node
126- work_path = self ._node .get_working_path ()
127+ work_path = self ._node .get_pure_path (
128+ self ._node .get_working_path_with_required_space (5 )
129+ )
127130 is_tarball = False
128131 for suffix in [".tar.gz" , ".tar.bz2" , ".tar" ]:
129132 if self ._tar_url .endswith (suffix ):
@@ -137,7 +140,9 @@ def download(self) -> PurePath:
137140 ).is_true ()
138141 if self ._is_remote_tarball :
139142 tarfile = node .tools [Wget ].get (
140- self ._tar_url , overwrite = False , file_path = str (node .get_working_path ())
143+ self ._tar_url ,
144+ overwrite = False ,
145+ file_path = str (work_path ),
141146 )
142147 remote_path = node .get_pure_path (tarfile )
143148 self .tar_filename = remote_path .name
0 commit comments