summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-01-25 17:18:24 +0700
committerGitHub <[email protected]>2021-01-25 17:18:24 +0700
commitc43ac7f1d79b25dae2d5ab073dc7d397fd9dedec (patch)
tree8086106787ab4b044deca2a5682d74e2f09eec1d /tools
parent469ca2f1559800f4b1eabc860336ff33ed118718 (diff)
parent6e027b1c4b454a573c6bcb9599d016d98bb6d05a (diff)
Merge pull request #603 from hathach/pico-followup
Pico followup for (ci) building examples
Diffstat (limited to 'tools')
-rw-r--r--tools/build_board.py2
-rw-r--r--tools/build_esp32s2.py2
-rw-r--r--tools/build_family.py14
3 files changed, 12 insertions, 6 deletions
diff --git a/tools/build_board.py b/tools/build_board.py
index cf3a8fb94..464ee68cf 100644
--- a/tools/build_board.py
+++ b/tools/build_board.py
@@ -44,7 +44,7 @@ filter_with_input(all_boards)
all_boards.sort()
def build_board(example, board):
- global success_count, fail_count, skip_count
+ global success_count, fail_count, skip_count, exit_status
start_time = time.monotonic()
flash_size = "-"
sram_size = "-"
diff --git a/tools/build_esp32s2.py b/tools/build_esp32s2.py
index cff0cc33b..9823e8c53 100644
--- a/tools/build_esp32s2.py
+++ b/tools/build_esp32s2.py
@@ -42,7 +42,7 @@ filter_with_input(all_boards)
all_boards.sort()
def build_board(example, board):
- global success_count, fail_count, skip_count
+ global success_count, fail_count, skip_count, exit_status
start_time = time.monotonic()
flash_size = "-"
sram_size = "-"
diff --git a/tools/build_family.py b/tools/build_family.py
index 7f2c1a706..ae1bf078d 100644
--- a/tools/build_family.py
+++ b/tools/build_family.py
@@ -55,7 +55,7 @@ def build_family(example, family):
build_board(example, board)
def build_board(example, board):
- global success_count, fail_count, skip_count
+ global success_count, fail_count, skip_count, exit_status
start_time = time.monotonic()
flash_size = "-"
sram_size = "-"
@@ -95,18 +95,24 @@ def build_size(example, board):
def skip_example(example, board):
ex_dir = 'examples/' + example
+
+ # family.mk
board_mk = 'hw/bsp/{}/family.mk'.format(family)
+
+ # family.cmake
+ if not os.path.exists(board_mk):
+ board_mk = 'hw/bsp/{}/family.cmake'.format(family)
with open(board_mk) as mk:
mk_contents = mk.read()
# Skip all OPT_MCU_NONE these are WIP port
- if '-DCFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
+ if 'CFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
return 1
# Skip if CFG_TUSB_MCU in board.mk to match skip file
for skip_file in glob.iglob(ex_dir + '/.skip.MCU_*'):
- mcu_cflag = '-DCFG_TUSB_MCU=OPT_' + os.path.basename(skip_file).split('.')[2]
+ mcu_cflag = 'CFG_TUSB_MCU=OPT_' + os.path.basename(skip_file).split('.')[2]
if mcu_cflag in mk_contents:
return 1
@@ -114,7 +120,7 @@ def skip_example(example, board):
only_list = list(glob.iglob(ex_dir + '/.only.MCU_*'))
if len(only_list) > 0:
for only_file in only_list:
- mcu_cflag = '-DCFG_TUSB_MCU=OPT_' + os.path.basename(only_file).split('.')[2]
+ mcu_cflag = 'CFG_TUSB_MCU=OPT_' + os.path.basename(only_file).split('.')[2]
if mcu_cflag in mk_contents:
return 0
return 1