Skip to content

Commit 828b7ac

Browse files
committed
Add an ignore list so that sets of test, target can be excluded from the
compilation set.
1 parent 9649d36 commit 828b7ac

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

tools/check_release.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"lib" : "mbed-dev"
1313
}
1414
],
15-
"target_list" : []
15+
"target_list" : [],
16+
"ignore_list" : []
1617
}
1718

tools/check_release.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,13 @@ def invoke_api(payload, url, auth, polls, begin="start/"):
158158
# poll for output
159159
for check in range(polls):
160160
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+
162168
response = r.json()
163169

164170
data = response['result']['data']
@@ -432,6 +438,12 @@ def log_results(lst, title):
432438
for tgt in OFFICIAL_MBED_LIBRARY_BUILD:
433439
supported_targets.append(tgt[0])
434440

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+
435447
config = json_data["config"]
436448
test_list = json_data["test_list"]
437449
repo_path = config["mbed_repo_path"]
@@ -474,32 +486,40 @@ def log_results(lst, title):
474486

475487
# Compile each test for each supported target
476488
for test in tests:
477-
rel_log.info("COMPILING PROGRAM: %s\n", test)
478489
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+
479499
current += 1
480500
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)
482502
result, mesg = build_repo(target, test, user, password)
483503
if not result:
484504
if mesg == 'Internal':
485505
# Internal compiler error thus retry
486506
continue
487507
else:
488508
# Actual error thus move on to next compilation
489-
failures.append([test, target])
509+
failures.append(combo)
490510
break
491511

492512
passes += (int)(result)
493513
break
494514
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.")
497517
total -= 1
498-
skipped.append([test, target])
518+
skipped.append(combo)
499519

500520
rel_log.info(" SUMMARY OF COMPILATION RESULTS")
501521
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",
503523
len(tests), len(supported_targets))
504524
log_results(failures, " FAILED")
505525
log_results(skipped, " SKIPPED")

0 commit comments

Comments
 (0)