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:
Jouni Malinen 2014-12-25 13:20:42 +02:00
parent 49e3eea8d9
commit ed8a1fa496

View file

@ -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(' ')