diff options
| author | hathach <[email protected]> | 2021-08-29 22:51:05 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-08-29 22:53:16 +0700 |
| commit | a05ea0d83b6c59316751e546dfec3ee4e2a286e1 (patch) | |
| tree | 18246faa975b03d723e017a7262651b792856121 /tools | |
| parent | b169db3fd6359a127ba92d4bd5cd48a3a5286fd7 (diff) | |
add CFG_EXAMPLE_MSC_READONLY for curiosity
allow family/board to exclude specific example. exclude
net_lwip_webserver from curiosity.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build_family.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/build_family.py b/tools/build_family.py index c46781904..4195c259b 100644 --- a/tools/build_family.py +++ b/tools/build_family.py @@ -98,21 +98,28 @@ def build_size(example, board): def skip_example(example, board): ex_dir = 'examples/' + example + # Check if example is skipped by family or board directory + skip_file = ".skip." + example.replace('/', '.'); + if os.path.isfile("hw/bsp/{}/{}".format(family, skip_file)) or os.path.isfile("hw/bsp/{}/boards/{}/{}".format(family, board, skip_file)): + return 1 + + # Otherwise check if mcu is excluded by example directory + # family CMake - board_mk = 'hw/bsp/{}/family.cmake'.format(family) + family_mk = 'hw/bsp/{}/family.cmake'.format(family) # family.mk - if not os.path.exists(board_mk): - board_mk = 'hw/bsp/{}/family.mk'.format(family) + if not os.path.exists(family_mk): + family_mk = 'hw/bsp/{}/family.mk'.format(family) - with open(board_mk) as mk: + with open(family_mk) as mk: mk_contents = mk.read() # Skip all OPT_MCU_NONE these are WIP port if 'CFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents: return 1 - # Skip if CFG_TUSB_MCU in board.mk to match skip file + # Skip if CFG_TUSB_MCU in family.mk to match skip file for skip_file in glob.iglob(ex_dir + '/.skip.MCU_*'): mcu_cflag = 'CFG_TUSB_MCU=OPT_' + os.path.basename(skip_file).split('.')[2] if mcu_cflag in mk_contents: |
