mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
add more begin timeout for networked sketches and actually fail if begin is not received (#2223)
This commit is contained in:
parent
39212baeb0
commit
af3b17c0bb
@ -42,15 +42,18 @@ class BSTestRunner(object):
|
|||||||
|
|
||||||
def get_test_list(self):
|
def get_test_list(self):
|
||||||
self.sp.sendline('-1')
|
self.sp.sendline('-1')
|
||||||
timeout = 10
|
self.tests = []
|
||||||
|
timeout = 100
|
||||||
while timeout > 0:
|
while timeout > 0:
|
||||||
res = self.sp.expect(['>>>>>bs_test_menu_begin', EOF, TIMEOUT])
|
res = self.sp.expect(['>>>>>bs_test_menu_begin', EOF, TIMEOUT])
|
||||||
if res == 0:
|
if res == 0:
|
||||||
break
|
break
|
||||||
timeout-=1
|
timeout-=1
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
if timeout <= 0:
|
||||||
|
debug_print('begin timeout')
|
||||||
|
return
|
||||||
debug_print('got begin')
|
debug_print('got begin')
|
||||||
self.tests = []
|
|
||||||
while True:
|
while True:
|
||||||
res = self.sp.expect(['>>>>>bs_test_item id\=(\d+) name\="([^\"]*?)" desc="([^"]*?)"',
|
res = self.sp.expect(['>>>>>bs_test_item id\=(\d+) name\="([^\"]*?)" desc="([^"]*?)"',
|
||||||
'>>>>>bs_test_menu_end',
|
'>>>>>bs_test_menu_end',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user