@@ -89,6 +89,7 @@ def main():
89
89
with open (ws_comment , 'w' ) as f :
90
90
f .write ("Compilation-performance test failed" )
91
91
92
+ failures = []
92
93
for instance in instances :
93
94
workspace = get_workspace_for_instance (instance , args )
94
95
@@ -100,9 +101,9 @@ def main():
100
101
build_swift_toolchain (workspace , args )
101
102
102
103
if not args .skip_runner :
103
- execute_runner (instance , workspace , configs , args )
104
+ failures += execute_runner (instance , workspace , configs , args )
104
105
105
- regressions = analyze_results (configs , args )
106
+ regressions = analyze_results (configs , failures , args )
106
107
107
108
# Crude hack to write output to workspace when in CI,
108
109
# regardless of --output passed.
@@ -272,6 +273,7 @@ def get_variant(config, args):
272
273
def execute_runner (instance , workspace , configs , args ):
273
274
projects = get_projects (args .suite )
274
275
swiftc_path = get_swiftc_path (instance , workspace , args )
276
+ failures = []
275
277
for config in configs :
276
278
variant = get_variant (config , args )
277
279
stats = get_stats_dir (instance , variant )
@@ -297,7 +299,14 @@ def execute_runner(instance, workspace, configs, args):
297
299
runner_command += get_sandbox_profile_flags ()
298
300
if args .verbose :
299
301
runner_command += ["--verbose" ]
300
- common .check_execute (runner_command , timeout = 9999999 )
302
+ try :
303
+ common .check_execute (runner_command , timeout = 9999999 )
304
+ except common .ExecuteCommandFailure :
305
+ fail_logs = [ re .sub ('FAIL_.*_(\\ w+).log' , '\\ 1' , n )
306
+ for n in os .listdir ("." )
307
+ if re .match ('FAIL.*.log' , n )]
308
+ failures += (fail_logs if len (fail_logs ) != 0 else ["unknown" ])
309
+ return failures
301
310
302
311
303
312
def get_table_name (reference , subset , variant ):
@@ -341,7 +350,7 @@ def get_baseline_name(variant):
341
350
'cperf-baselines' , variant + '.csv' )
342
351
343
352
344
- def analyze_results (configs , args ):
353
+ def analyze_results (configs , failures , args ):
345
354
# Make a separate random run_id for each comment, to uniquify links.
346
355
run_id = hex (random .randint (1 , 2 ** 63 ))[2 :]
347
356
old_ws = get_workspace_for_instance (OLD_INSTANCE , args )
@@ -396,6 +405,9 @@ def analyze_results(configs, args):
396
405
out = args .output
397
406
regressions = any (x != 0 for x in returncodes )
398
407
out .write ("# Summary for %s %s\n \n " % (args .swift_branch , args .suite ))
408
+ if len (failures ) != 0 :
409
+ out .write ("**Unexpected test results, stats may be off for %s**\n \n " %
410
+ ", " .join (set (failures )))
399
411
if regressions :
400
412
out .write ("**Regressions found (see below)**\n \n " )
401
413
else :
0 commit comments