CI: ignore a non-fatal error in the loadable ELF file example

pull/4494/head
Roland Dobai 2019-11-25 10:12:51 +01:00
rodzic 8eef8654a6
commit 686abe6a2f
1 zmienionych plików z 17 dodań i 6 usunięć

Wyświetl plik

@ -34,14 +34,25 @@ class CustomProcess(object):
class OCDProcess(CustomProcess):
def __init__(self, proj_path):
cmd = 'openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg'
cmd = 'openocd -f board/esp32-wrover-kit-3.3v.cfg'
log_file = os.path.join(proj_path, 'openocd.log')
super(OCDProcess, self).__init__(cmd, log_file)
i = self.p.expect_exact(['Info : Listening on port 3333 for gdb connections', 'Error:'])
if i == 0:
Utility.console_log('openocd is listening for gdb connections')
else:
raise RuntimeError('openocd initialization has failed')
patterns = ['Info : Listening on port 3333 for gdb connections',
'Error: type \'esp32\' is missing virt2phys']
try:
while True:
i = self.p.expect_exact(patterns, timeout=30)
# TIMEOUT or EOF exceptions will be thrown upon other errors
if i == 0:
Utility.console_log('openocd is listening for gdb connections')
break # success
elif i == 1:
Utility.console_log('Ignoring error: "{}"'.format(patterns[i]))
# this error message is ignored because it is not a fatal error
except Exception:
Utility.console_log('openocd initialization has failed', 'R')
raise
def close(self):
try: