]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Limit number of failed test cases in the curses output
authorJouni Malinen <j@w1.fi>
Thu, 25 Dec 2014 11:20:42 +0000 (13:20 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 26 Dec 2014 11:21:00 +0000 (13:21 +0200)
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>
tests/hwsim/vm/parallel-vm.py

index 4acb733867987855a1b6572e4115fc38f8d1a472..3b488bebb478ba4c45c63f7431b64959bb99a4a7 100755 (executable)
@@ -211,7 +211,13 @@ def show_progress(scr):
                 scr.move(num_servers + 2, 0)
                 scr.clrtoeol()
                 scr.addstr("Failed test cases: ")
+                count = 0
                 for f in failed:
+                    count += 1
+                    if count > 30:
+                        scr.addstr('...')
+                        scr.clrtoeol()
+                        break
                     scr.addstr(f)
                     scr.addstr(' ')