Skip to content

Commit

Permalink
add more begin timeout for networked sketches and actually fail if be…
Browse files Browse the repository at this point in the history
…gin is not received (esp8266#2223)
  • Loading branch information
me-no-dev authored and igrr committed Jul 4, 2016
1 parent 39212ba commit af3b17c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/device/libraries/BSTest/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ def __init__(self, spawn_obj, name, mocks):

def get_test_list(self):
self.sp.sendline('-1')
timeout = 10
self.tests = []
timeout = 100
while timeout > 0:
res = self.sp.expect(['>>>>>bs_test_menu_begin', EOF, TIMEOUT])
if res == 0:
break
timeout-=1
time.sleep(0.1)
if timeout <= 0:
debug_print('begin timeout')
return
debug_print('got begin')
self.tests = []
while True:
res = self.sp.expect(['>>>>>bs_test_item id\=(\d+) name\="([^\"]*?)" desc="([^"]*?)"',
'>>>>>bs_test_menu_end',
Expand Down

0 comments on commit af3b17c

Please sign in to comment.