fixed pi4 hil test elf location

This commit is contained in:
hathach
2023-11-28 19:10:19 +07:00
parent 0a4d92a71e
commit 1a6756c254

View File

@@ -252,13 +252,20 @@ if __name__ == '__main__':
test_list.remove(skip) test_list.remove(skip)
for test in test_list: for test in test_list:
mk_elf = f'examples/device/{test}/_build/{board["name"]}/{test}.elf' # cmake, make, download from artifacts
cmake_elf = f'cmake-build/cmake-build-{board["name"]}/device/{test}/{test}.elf' elf_list = [
if os.path.isfile(cmake_elf): f'cmake-build/cmake-build-{board["name"]}/device/{test}/{test}.elf',
elf = cmake_elf f'examples/device/{test}/_build/{board["name"]}/{test}.elf',
elif os.path.isfile(mk_elf): f'{test}.elf'
elf = mk_elf ]
else:
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}') print(f'Cannot find firmware file for {test}')
sys.exit(-1) sys.exit(-1)