diff options
| author | hathach <[email protected]> | 2025-07-09 17:58:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-07-09 21:54:23 +0700 |
| commit | b5694fd40a13445a6df7c88150593d152b54397d (patch) | |
| tree | 31e06463d47c948d03c3a1635ede9b25822ff7a6 /test | |
| parent | 227b22de02d2b1b1d66adcb612de85e71aa98269 (diff) | |
add option to pass symbol defines to ci build.py
add build.args option for hil json
add MAX3421_HOST=1 for metro m4 express
Diffstat (limited to 'test')
| -rw-r--r-- | test/hil/hil_ci_set_matrix.py | 20 | ||||
| -rw-r--r-- | test/hil/tinyusb.json | 3 |
2 files changed, 16 insertions, 7 deletions
diff --git a/test/hil/hil_ci_set_matrix.py b/test/hil/hil_ci_set_matrix.py index 67ce2abb8..ecd964d87 100644 --- a/test/hil/hil_ci_set_matrix.py +++ b/test/hil/hil_ci_set_matrix.py @@ -28,14 +28,20 @@ def main(): else: toolchain = 'arm-gcc' - if 'build' in board and 'flags_on' in board['build']: - for f in board['build']['flags_on']: - if f == '': - matrix[toolchain].append(f'-b {name}') - else: - matrix[toolchain].append(f'-b {name} -f1 {f.replace(" ", " -f1 ")}') + build_board = f'-b {name}' + if 'build' in board: + if 'args' in board['build']: + build_board += ' ' + ' '.join(f'-D{a}' for a in board['build']['args']) + if 'flags_on' in board['build']: + for f in board['build']['flags_on']: + if f == '': + matrix[toolchain].append(build_board) + else: + matrix[toolchain].append(f'{build_board} -f1 {f.replace(" ", " -f1 ")}') + else: + matrix[toolchain].append(build_board) else: - matrix[toolchain].append(f'-b {name}') + matrix[toolchain].append(build_board) print(json.dumps(matrix)) diff --git a/test/hil/tinyusb.json b/test/hil/tinyusb.json index 8a835e4c0..6afcb2186 100644 --- a/test/hil/tinyusb.json +++ b/test/hil/tinyusb.json @@ -61,6 +61,9 @@ { "name": "metro_m4_express", "uid": "9995AD485337433231202020FF100A34", + "build" : { + "args": ["MAX3421_HOST=1"] + }, "tests": { "device": true, "host": false, "dual": true, "dev_attached": [{"vid_pid": "1a86_55d4", "serial": "52D2002130"}] |
