CI: Don't download esp32s2beta builds into example tests
This commit is contained in:
parent
1f323ca107
commit
86fd13230e
3 changed files with 15 additions and 3 deletions
|
@ -64,8 +64,14 @@ class GDBProcess(CustomProcess):
|
||||||
'Load failed'])
|
'Load failed'])
|
||||||
if i == 0:
|
if i == 0:
|
||||||
Utility.console_log('gdb is at breakpoint')
|
Utility.console_log('gdb is at breakpoint')
|
||||||
|
elif i == 1:
|
||||||
|
raise RuntimeError('Load has failed. Please examine the logs.')
|
||||||
else:
|
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)')
|
self.p.expect_exact('(gdb)')
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
@ -114,9 +120,14 @@ def test_examples_loadable_elf(env, extra_data):
|
||||||
idf_path = os.environ['IDF_PATH']
|
idf_path = os.environ['IDF_PATH']
|
||||||
rel_project_path = os.path.join('examples', 'get-started', 'hello_world')
|
rel_project_path = os.path.join('examples', 'get-started', 'hello_world')
|
||||||
proj_path = os.path.join(idf_path, rel_project_path)
|
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')
|
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 SerialThread(esp_log_path):
|
||||||
with OCDProcess(proj_path), GDBProcess(proj_path, elf_path) as gdb:
|
with OCDProcess(proj_path), GDBProcess(proj_path, elf_path) as gdb:
|
||||||
gdb.break_till_end()
|
gdb.break_till_end()
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
- assign_test
|
- assign_test
|
||||||
- build_examples_make
|
- build_examples_make
|
||||||
- build_examples_cmake_esp32
|
- build_examples_cmake_esp32
|
||||||
- build_examples_cmake_esp32s2
|
|
||||||
artifacts:
|
artifacts:
|
||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
|
|
|
@ -213,6 +213,8 @@ class Example(IDFApp):
|
||||||
# search for CI build folders
|
# search for CI build folders
|
||||||
app = os.path.basename(app_path)
|
app = os.path.basename(app_path)
|
||||||
example_path = os.path.join(self.idf_path, "build_examples", "example_builds")
|
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):
|
for dirpath, dirnames, files in os.walk(example_path):
|
||||||
if dirnames:
|
if dirnames:
|
||||||
if dirnames[0] == app:
|
if dirnames[0] == app:
|
||||||
|
|
Loading…
Reference in a new issue