@@ -166,7 +166,7 @@ def _run_cmd(cmd, timeout=TIMEOUT, capture_on_failure=True):
166
166
log ("[EXEC] finished '{}' with exit code {} in {:.3f}s" , cmd_string , proc .returncode , delta )
167
167
msg = "Finished: {:.3f}s" .format (delta )
168
168
169
- return proc .returncode == 0 , output .decode ("utf-8" , "ignore" ) + " \n " + msg
169
+ return proc .returncode == 0 , output .decode ("utf-8" , "ignore" ), msg
170
170
171
171
172
172
def scp (results_file_path , destination_path , destination_name = None ):
@@ -181,11 +181,13 @@ def _run_unittest(test_path, timeout, with_cpython=False):
181
181
cmd = ["python3" , test_path , "-v" ]
182
182
else :
183
183
cmd = ["mx" , "python3" , "--python.CatchAllExceptions=true" , test_path , "-v" ]
184
- output = _run_cmd (cmd , timeout )[ 1 ]
184
+ _ , output , msg = _run_cmd (cmd , timeout )
185
185
output = '''
186
186
##############################################################
187
- #### running: {}
188
- ''' .format (test_path ) + output
187
+ #### running: {}
188
+ {}
189
+ {}
190
+ ''' .format (test_path , output , msg )
189
191
return output
190
192
191
193
@@ -236,8 +238,8 @@ def get_remote_host(scp_path):
236
238
237
239
def ssh_ls (scp_path ):
238
240
user , host , path = get_remote_host (scp_path )
239
- cmd = ['ssh' , '{}@{}' .format (user , host ), 'ls' , '-l ' , path ]
240
- return map ( lambda l : l . split ()[ - 1 ], _run_cmd (cmd )[1 ].splitlines ())
241
+ cmd = ['ssh' , '{}@{}' .format (user , host ), 'ls' , '-1 ' , path ]
242
+ return [ f for f in _run_cmd (cmd )[1 ].splitlines () if f ]
241
243
242
244
243
245
def read_csv (path ):
@@ -979,7 +981,7 @@ def _fmt(t):
979
981
if flags .gate and flags .regression_running_tests :
980
982
log ("[REGRESSION] detecting regression, acceptance threshold = {}%" .format (
981
983
flags .regression_running_tests * 100 ))
982
- csv_files = list ( filter ( lambda entry : True if PTRN_VALID_CSV_NAME . match ( entry ) else False , ssh_ls (flags .path )))
984
+ csv_files = sorted ( f for f in ssh_ls (flags .path ) if PTRN_VALID_CSV_NAME . match ( f ))
983
985
last_csv = csv_files [- 1 ]
984
986
# log('\n'.join(csv_files))
985
987
# read the remote csv and extract stats
0 commit comments