|
19 | 19 | ['metro_m0_tinyusb', 'adafruit:samd:adafruit_metro_m0:usbstack=tinyusb'],
|
20 | 20 | ['metro_m4_tinyusb', 'adafruit:samd:adafruit_metro_m4:speed=120,usbstack=tinyusb'],
|
21 | 21 | ['nrf52840', 'adafruit:nrf52:feather52840'],
|
22 |
| - ['feather_rp2040_tinyusb', 'rp2040:rp2040:adafruit_feather:flash=8388608_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb'], |
23 |
| - ['metroesp32s2', 'espressif:esp32:adafruit_metro_esp32s2:CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=cdc,PSRAM=enabled,PartitionScheme=tinyuf2'], |
24 |
| - #[' ', 'espressif:esp32:adafruit_feather_esp32s3:FlashMode=qio,LoopCore=1,EventsCore=1,USBMode=default,CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=cdc,PartitionScheme=tinyuf2'], |
25 |
| - ['ch32v20x', 'WCH:ch32v:CH32V20x_EVT'] |
| 22 | + ['feather_rp2040_tinyusb', |
| 23 | + 'rp2040:rp2040:adafruit_feather:flash=8388608_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb'], |
| 24 | + ['metroesp32s2', |
| 25 | + 'espressif:esp32:adafruit_metro_esp32s2:CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=cdc,PSRAM=enabled,PartitionScheme=tinyuf2'], |
| 26 | + # [' ', 'espressif:esp32:adafruit_feather_esp32s3:FlashMode=qio,LoopCore=1,EventsCore=1,USBMode=default,CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=cdc,PartitionScheme=tinyuf2'], |
| 27 | + ['CH32V20x_EVT', 'WCH:ch32v:CH32V20x_EVT'] |
26 | 28 | ]
|
27 | 29 |
|
28 | 30 |
|
29 | 31 | # return [succeeded, failed, skipped]
|
30 | 32 | def build_sketch(variant, sketch):
|
31 | 33 | ret = [0, 0, 0]
|
32 |
| - |
33 | 34 | name = variant[0]
|
34 | 35 | fqbn = variant[1]
|
35 |
| - |
36 | 36 | start_time = time.monotonic()
|
37 |
| - # Skip if contains: ".board.test.skip" or ".all.test.skip" |
38 |
| - # Skip if not contains: ".board.test.only" for a specific board |
| 37 | + |
| 38 | + # Skip if |
| 39 | + # - contains ".board.test.skip" |
| 40 | + # - contains any of ".board.test.only" but not this one |
| 41 | + # - conntain .skip.txt has this board in it |
39 | 42 | sketchdir = os.path.dirname(sketch)
|
40 |
| - if os.path.exists(sketchdir + '/.all.test.skip') or os.path.exists(sketchdir + '/.' + name + '.test.skip') or \ |
| 43 | + if os.path.exists(sketchdir + '/.' + name + '.test.skip') or \ |
41 | 44 | (glob.glob(sketchdir + "/.*.test.only") and not os.path.exists(sketchdir + '/.' + name + '.test.only')):
|
42 |
| - success = SKIPPED |
43 | 45 | ret[2] = 1
|
| 46 | + |
| 47 | + skip_txt = f"{sketchdir}/.skip.txt" |
| 48 | + if os.path.exists(skip_txt): |
| 49 | + with open(skip_txt) as f: |
| 50 | + lines = f.readlines() |
| 51 | + for line in lines: |
| 52 | + if line.strip() == name: |
| 53 | + ret[2] = 1 |
| 54 | + break |
| 55 | + |
| 56 | + if ret[2] == 1: |
| 57 | + success = SKIPPED |
44 | 58 | else:
|
45 | 59 | build_result = subprocess.run("arduino-cli compile --warnings all --fqbn {} {}".format(fqbn, sketch),
|
46 | 60 | shell=True, stdout=PIPE, stderr=PIPE)
|
47 |
| - |
48 | 61 | # get stderr into a form where warning/error was output to stderr
|
49 | 62 | if build_result.returncode != 0:
|
50 | 63 | success = FAILED
|
@@ -93,8 +106,7 @@ def build_variant(variant):
|
93 | 106 | else:
|
94 | 107 | build_boards = all_boards
|
95 | 108 |
|
96 |
| - #all_examples = list(glob.iglob('examples/**/*.ino', recursive=True)) |
97 |
| - all_examples = [f for f in glob.iglob('examples/**/*.ino', recursive=True) if 'examples/DualRole' not in f] |
| 109 | + all_examples = list(glob.iglob('examples/**/*.ino', recursive=True)) |
98 | 110 | all_examples.sort()
|
99 | 111 |
|
100 | 112 | total_time = time.monotonic()
|
|
0 commit comments