tiny-test-fw: support translate backtrace in IDFDUT

This commit is contained in:
He Yin Ling
2019-03-18 12:16:24 +08:00
committed by bot
parent cbc438c807
commit 31c8be0738
3 changed files with 44 additions and 10 deletions

View File

@@ -33,6 +33,7 @@ class IDFApp(App.BaseApp):
super(IDFApp, self).__init__(app_path)
self.idf_path = self.get_sdk_path()
self.binary_path = self.get_binary_path(app_path)
self.elf_file = self._get_elf_file_path(self.binary_path)
assert os.path.exists(self.binary_path)
if self.IDF_DOWNLOAD_CONFIG_FILE not in os.listdir(self.binary_path):
if self.IDF_FLASH_ARGS_FILE not in os.listdir(self.binary_path):
@@ -94,6 +95,15 @@ class IDFApp(App.BaseApp):
"""
pass
@staticmethod
def _get_elf_file_path(binary_path):
ret = ""
file_names = os.listdir(binary_path)
for fn in file_names:
if os.path.splitext(fn)[1] == ".elf":
ret = os.path.join(binary_path, fn)
return ret
def _parse_flash_download_config(self):
"""
Parse flash download config from build metadata files