@@ -145,6 +145,13 @@ def test_upload(sshserver, tmp_path):
145
145
_check_ls_result (ssh_executor , common_files [0 ])
146
146
147
147
148
+ def _print_env (ssh_executor : ShellCommandExecutor ):
149
+ r = ssh_executor .execute_command (b'uname -a' )
150
+ print (repr (tuple (r )), file = sys .stderr )
151
+ r = ssh_executor .execute_command (b'env' )
152
+ print (repr (tuple (r )), file = sys .stderr )
153
+
154
+
148
155
def test_download (sshserver , tmp_path ):
149
156
ssh_url , local_path = sshserver
150
157
ssh_args , ssh_path = _get_cmdline (ssh_url )
@@ -157,12 +164,17 @@ def test_download(sshserver, tmp_path):
157
164
# perform an operation on the remote shell
158
165
_check_ls_result (ssh_executor , common_files [0 ])
159
166
167
+ # The following allows the appveyor Mac VMs to find `7z`-binaries
168
+ r = ssh_executor .execute_command (
169
+ b'if [ $(uname) == "Darwin" ]; then export PATH="$PATH":/usr/local/bin; fi' )
170
+ consume (r )
160
171
# download file from server and verify its content
161
172
r , stderr = ssh_executor .download (
162
173
PurePosixPath (ssh_path + '/' + test_file_name ),
163
174
download_file )
164
175
if r != 0 :
165
176
print ('ssh download stderr output:' , repr (stderr ), file = sys .stderr )
177
+ _print_env (ssh_executor )
166
178
assert r == 0
167
179
assert download_file .read_text () == content
168
180
@@ -179,12 +191,17 @@ def test_end_marker_download(sshserver, tmp_path):
179
191
with shell_connection (ssh_args ) as ssh_executor :
180
192
server_file .write_bytes (ssh_executor .end_marker )
181
193
194
+ # The following allows the appveyor Mac VMs to find `7z`-binaries
195
+ r = ssh_executor .execute_command (
196
+ b'if [ $(uname) == "Darwin" ]; then export PATH="$PATH":/usr/local/bin; fi' )
197
+ consume (r )
182
198
# download file from server and verify its content
183
199
r , stderr = ssh_executor .download (
184
200
PurePosixPath (ssh_path + '/' + test_file_name ),
185
201
download_file )
186
202
if r != 0 :
187
203
print ('ssh download stderr output:' , repr (stderr ), file = sys .stderr )
204
+ _print_env (ssh_executor )
188
205
assert r == 0
189
206
assert download_file .read_bytes () == ssh_executor .end_marker
190
207
0 commit comments