5
5
from typing import Any , Callable , Dict , List , Optional , Sequence , Type , Union
6
6
from urllib .parse import urlparse
7
7
8
- from assertpy import assert_that
8
+ from assertpy import assert_that , fail
9
9
from semver import VersionInfo
10
10
from urllib3 .util .url import parse_url
11
11
12
12
from lisa import Node
13
- from lisa .executable import Tool
13
+ from lisa .executable import ExecutableResult , Tool
14
14
from lisa .operating_system import Debian , Fedora , Oracle , Posix , Suse , Ubuntu
15
15
from lisa .tools import Git , Lscpu , Tar , Wget
16
16
from lisa .tools .lscpu import CpuArchitecture
@@ -99,9 +99,10 @@ def download(self) -> PurePath:
99
99
# NOTE: fail on exists is set to True.
100
100
# The expectation is that the parent Installer class should
101
101
# remove any lingering installations
102
+ work_path = self ._node .get_working_path_with_required_space (5 )
102
103
self .asset_path = self ._node .tools [Git ].clone (
103
104
self ._git_repo ,
104
- cwd = self ._node .get_working_path ( ),
105
+ cwd = self ._node .get_pure_path ( work_path ),
105
106
ref = self ._git_ref ,
106
107
fail_on_exists = False ,
107
108
)
@@ -123,7 +124,9 @@ def __init__(
123
124
# then extract it
124
125
def download (self ) -> PurePath :
125
126
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
+ )
127
130
is_tarball = False
128
131
for suffix in [".tar.gz" , ".tar.bz2" , ".tar" ]:
129
132
if self ._tar_url .endswith (suffix ):
@@ -137,7 +140,9 @@ def download(self) -> PurePath:
137
140
).is_true ()
138
141
if self ._is_remote_tarball :
139
142
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 ),
141
146
)
142
147
remote_path = node .get_pure_path (tarfile )
143
148
self .tar_filename = remote_path .name
0 commit comments