diff options
| author | hathach <[email protected]> | 2021-01-13 17:34:22 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-01-13 17:34:22 +0700 |
| commit | ffe0fc75376a7560074ebc5e54fa837a89137e3c (patch) | |
| tree | 39047da952d4016a211f41c071a63cdf0a2f1557 | |
| parent | 4f41501fc743b70e014231c195bce4508c87d17b (diff) | |
update build_all.py to support both single board and family group
| -rw-r--r-- | tools/build_all.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/build_all.py b/tools/build_all.py index 172cb2070..787011e26 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -40,8 +40,13 @@ all_examples.sort() all_boards = [] for entry in os.scandir("hw/bsp"): - if entry.is_dir(): - all_boards.append(entry.name) + if entry.is_dir() and entry.name != "esp32s2": + if os.path.isdir(entry.path + "/boards"): + # family directory + for subentry in os.scandir(entry.path + "/boards"): + if subentry.is_dir(): all_boards.append(subentry.name) + else: + all_boards.append(entry.name) if len(sys.argv) > 1: input_boards = list(set(all_boards).intersection(sys.argv)) @@ -67,15 +72,14 @@ def build_size(example, board): def skip_example(example, board): ex_dir = 'examples/' + example + board_mk = 'hw/bsp/{}/board.mk'.format(board) + if not os.path.exists(board_mk): + board_mk = list(glob.iglob('hw/bsp/*/boards/{}/../../family.mk'.format(board)))[0] with open(board_mk) as mk: mk_contents = mk.read() - # Skip all ESP32-S2 board for CI - if 'CROSS_COMPILE = xtensa-esp32s2-elf-' in mk_contents: - return 1 - # Skip all OPT_MCU_NONE these are WIP port if '-DCFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents: return 1 |
