summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-11-28 19:10:19 +0700
committerhathach <[email protected]>2023-11-28 19:10:19 +0700
commit1a6756c254a9f9a349bc691cc6aa8cff4ac2c920 (patch)
tree40c566ae504ac8cc1072f8a57cbca6e5b344cb5d /test
parent0a4d92a71e8b25daedc8cf4a388dd9abd2539419 (diff)
fixed pi4 hil test elf location
Diffstat (limited to 'test')
-rw-r--r--test/hil/hil_test.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index 06640a470..a6542fe2d 100644
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -252,13 +252,20 @@ if __name__ == '__main__':
test_list.remove(skip)
for test in test_list:
- mk_elf = f'examples/device/{test}/_build/{board["name"]}/{test}.elf'
- cmake_elf = f'cmake-build/cmake-build-{board["name"]}/device/{test}/{test}.elf'
- if os.path.isfile(cmake_elf):
- elf = cmake_elf
- elif os.path.isfile(mk_elf):
- elf = mk_elf
- else:
+ # cmake, make, download from artifacts
+ elf_list = [
+ f'cmake-build/cmake-build-{board["name"]}/device/{test}/{test}.elf',
+ f'examples/device/{test}/_build/{board["name"]}/{test}.elf',
+ f'{test}.elf'
+ ]
+
+ elf = None
+ for e in elf_list:
+ if os.path.isfile(e):
+ elf = e
+ break
+
+ if elf is None:
print(f'Cannot find firmware file for {test}')
sys.exit(-1)