From 31c123aa32f643c18ca14ff9e348e4c2d66e3963 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 4 Oct 2024 17:38:57 +0700 Subject: [PATCH] update new json change --- .github/workflows/hil_test.yml | 4 +++- test/hil/hil_test.py | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/hil_test.yml b/.github/workflows/hil_test.yml index d5f4e4fddd..c6e7f33b0b 100644 --- a/.github/workflows/hil_test.yml +++ b/.github/workflows/hil_test.yml @@ -83,4 +83,6 @@ jobs: merge-multiple: true - name: Test on actual hardware - run: python3 test/hil/hil_test.py ${{ env.HIL_JSON }} + run: | + ls cmake-build/ + python3 test/hil/hil_test.py ${{ env.HIL_JSON }} diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index eaa9dd3bdd..50f72b30f5 100644 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -424,20 +424,20 @@ def test_board(board): test_list.append('device/board_test') err_count = 0 - flags_opt_list = [""] - if 'build_flags_on' in board: - flags_opt_list = board['build_flags_on'] - - for flags_opt in flags_opt_list: - flags_opt_str = "" - if flags_opt != "": - flags_opt_str = '-' + flags_opt.replace(' ', '-') + flags_on_list = [""] + if 'build' in board and 'flags_on' in board['build']: + flags_on_list = board['build']['flags_on'] + + for f1 in flags_on_list: + f1_str = "" + if f1 != "": + f1_str = '-' + f1.replace(' ', '-') for test in test_list: - fw_dir = f'cmake-build/cmake-build-{name}{flags_opt_str}/{test}' + fw_dir = f'cmake-build/cmake-build-{name}{f1_str}/{test}' if not os.path.exists(fw_dir): - fw_dir = f'examples/cmake-build-{name}{flags_opt_str}/{test}' + fw_dir = f'examples/cmake-build-{name}{f1_str}/{test}' fw_name = f'{fw_dir}/{os.path.basename(test)}' - print(f'{name+flags_opt_str:40} {test:30} ... ', end='') + print(f'{name+f1_str:40} {test:30} ... ', end='') if not os.path.exists(fw_dir): print('Skip (no binary)')