Skip to content

Commit dc25f47

Browse files
authored
Merge pull request #186 from adafruit/skip-list-file
support .skip.txt each platform per line
2 parents 7803502 + 545c7b8 commit dc25f47

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

build_platform.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,30 @@ def test_examples_in_folder(platform, folderpath):
339339
continue
340340

341341
print('\t'+example, end=' ')
342+
342343
# check if we should SKIP
343344
skipfilename = folderpath+"/."+platform+".test.skip"
344345
onlyfilename = folderpath+"/."+platform+".test.only"
345346
# check if we should GENERATE UF2
346347
gen_file_name = folderpath+"/."+platform+".generate"
348+
349+
# .skip txt include all skipped platforms, one per line
350+
skip_txt = folderpath+"/.skip.txt"
351+
352+
is_skip = False
347353
if os.path.exists(skipfilename):
354+
is_skip = True
355+
if os.path.exists(skip_txt):
356+
with open(skip_txt) as f:
357+
lines = f.readlines()
358+
for line in lines:
359+
if line.strip() == platform:
360+
is_skip = True
361+
break
362+
if is_skip:
348363
ColorPrint.print_warn("skipping")
349364
continue
365+
350366
if glob.glob(folderpath+"/.*.test.only"):
351367
platformname = glob.glob(folderpath+"/.*.test.only")[0].split('.')[1]
352368
if platformname != "none" and not platformname in ALL_PLATFORMS:

0 commit comments

Comments
 (0)