@@ -158,7 +158,13 @@ def invoke_api(payload, url, auth, polls, begin="start/"):
158
158
# poll for output
159
159
for check in range (polls ):
160
160
time .sleep (poll_delay )
161
- r = requests .get (url + "output/%s" % uuid , auth = auth )
161
+
162
+ try :
163
+ r = requests .get (url + "output/%s" % uuid , auth = auth )
164
+
165
+ except ConnectionError :
166
+ return "Internal"
167
+
162
168
response = r .json ()
163
169
164
170
data = response ['result' ]['data' ]
@@ -432,6 +438,12 @@ def log_results(lst, title):
432
438
for tgt in OFFICIAL_MBED_LIBRARY_BUILD :
433
439
supported_targets .append (tgt [0 ])
434
440
441
+ ignore_list = []
442
+
443
+ if len (json_data ["ignore_list" ]) > 0 :
444
+ # List of tuples of (test, target) to be ignored in this test
445
+ ignore_list = json_data ["ignore_list" ]
446
+
435
447
config = json_data ["config" ]
436
448
test_list = json_data ["test_list" ]
437
449
repo_path = config ["mbed_repo_path" ]
@@ -474,32 +486,40 @@ def log_results(lst, title):
474
486
475
487
# Compile each test for each supported target
476
488
for test in tests :
477
- rel_log .info ("COMPILING PROGRAM: %s\n " , test )
478
489
for target in supported_targets :
490
+
491
+ combo = [test , target ]
492
+
493
+ if combo in ignore_list :
494
+ rel_log .info ("SKIPPING TEST: %s, TARGET: %s" , test , target )
495
+ total -= 1
496
+ skipped .append (combo )
497
+ continue
498
+
479
499
current += 1
480
500
for retry in range (0 , retries ):
481
- rel_log .info ("COMPILING TARGET (%d/%d): %s , attempt %u\n " , current , total , target , retry )
501
+ rel_log .info ("COMPILING (%d/%d): TEST %s, TARGET: %s , attempt %u\n " , current , total , test , target , retry )
482
502
result , mesg = build_repo (target , test , user , password )
483
503
if not result :
484
504
if mesg == 'Internal' :
485
505
# Internal compiler error thus retry
486
506
continue
487
507
else :
488
508
# Actual error thus move on to next compilation
489
- failures .append ([ test , target ] )
509
+ failures .append (combo )
490
510
break
491
511
492
512
passes += (int )(result )
493
513
break
494
514
else :
495
- rel_log .error ("Compilation failed due to internal errors.\n " )
496
- rel_log .error ("Skipping test/target combination! \n " )
515
+ rel_log .error ("Compilation failed due to internal errors." )
516
+ rel_log .error ("Skipping test/target combination. " )
497
517
total -= 1
498
- skipped .append ([ test , target ] )
518
+ skipped .append (combo )
499
519
500
520
rel_log .info (" SUMMARY OF COMPILATION RESULTS" )
501
521
rel_log .info (" ------------------------------" )
502
- rel_log .info (" NUMBER OF TEST APPS: %d, NUMBER OF TARGETS: %d\n " ,
522
+ rel_log .info (" NUMBER OF TEST APPS: %d, NUMBER OF TARGETS: %d" ,
503
523
len (tests ), len (supported_targets ))
504
524
log_results (failures , " FAILED" )
505
525
log_results (skipped , " SKIPPED" )
0 commit comments