CI: Don't download esp32s2beta builds into example tests

This commit is contained in:
Roland Dobai 2019-11-05 14:48:30 +01:00 committed by bot
parent 1f323ca107
commit 86fd13230e
3 changed files with 15 additions and 3 deletions

View file

@ -64,8 +64,14 @@ class GDBProcess(CustomProcess):
'Load failed'])
if i == 0:
Utility.console_log('gdb is at breakpoint')
elif i == 1:
raise RuntimeError('Load has failed. Please examine the logs.')
else:
raise RuntimeError('Load failed: probably the ELF file was not built for loading with gdb')
Utility.console_log('i = {}'.format(i))
Utility.console_log(str(self.p))
# This really should not happen. TIMEOUT and EOF failures are exceptions.
raise RuntimeError('An unknown error has occurred. Please examine the logs.')
self.p.expect_exact('(gdb)')
def close(self):
@ -114,9 +120,14 @@ def test_examples_loadable_elf(env, extra_data):
idf_path = os.environ['IDF_PATH']
rel_project_path = os.path.join('examples', 'get-started', 'hello_world')
proj_path = os.path.join(idf_path, rel_project_path)
elf_path = os.path.join(IDF.Example(rel_project_path).get_binary_path(rel_project_path), 'hello-world.elf')
example = IDF.Example(rel_project_path)
sdkconfig = example.get_sdkconfig()
elf_path = os.path.join(example.get_binary_path(rel_project_path), 'hello-world.elf')
esp_log_path = os.path.join(proj_path, 'esp.log')
assert(sdkconfig['CONFIG_IDF_TARGET_ESP32'] == 'y'), "Only ESP32 target is supported"
assert(sdkconfig['CONFIG_APP_BUILD_TYPE_ELF_RAM'] == 'y'), "ELF should be built with CONFIG_APP_BUILD_TYPE_ELF_RAM"
with SerialThread(esp_log_path):
with OCDProcess(proj_path), GDBProcess(proj_path, elf_path) as gdb:
gdb.break_till_end()

View file

@ -23,7 +23,6 @@
- assign_test
- build_examples_make
- build_examples_cmake_esp32
- build_examples_cmake_esp32s2
artifacts:
when: always
paths:

View file

@ -213,6 +213,8 @@ class Example(IDFApp):
# search for CI build folders
app = os.path.basename(app_path)
example_path = os.path.join(self.idf_path, "build_examples", "example_builds")
# example_path has subdirectories named after targets. So we need to look into only the right
# subdirectory. Currently, the target is not known at this moment.
for dirpath, dirnames, files in os.walk(example_path):
if dirnames:
if dirnames[0] == app: