tests: Limit number of failed test cases in the curses output
It was possible for the scr.addstr() operations to fail and terminate parallel-vm.py if the number of failed test cases increased beyond what fits on the screen. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
49e3eea8d9
commit
ed8a1fa496
1 changed files with 6 additions and 0 deletions
|
@ -211,7 +211,13 @@ def show_progress(scr):
|
||||||
scr.move(num_servers + 2, 0)
|
scr.move(num_servers + 2, 0)
|
||||||
scr.clrtoeol()
|
scr.clrtoeol()
|
||||||
scr.addstr("Failed test cases: ")
|
scr.addstr("Failed test cases: ")
|
||||||
|
count = 0
|
||||||
for f in failed:
|
for f in failed:
|
||||||
|
count += 1
|
||||||
|
if count > 30:
|
||||||
|
scr.addstr('...')
|
||||||
|
scr.clrtoeol()
|
||||||
|
break
|
||||||
scr.addstr(f)
|
scr.addstr(f)
|
||||||
scr.addstr(' ')
|
scr.addstr(' ')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue