From ed8a1fa496a07c24b7212878ae422f45e84c7877 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 25 Dec 2014 13:20:42 +0200 Subject: [PATCH] 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 --- tests/hwsim/vm/parallel-vm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py index 4acb73386..3b488bebb 100755 --- a/tests/hwsim/vm/parallel-vm.py +++ b/tests/hwsim/vm/parallel-vm.py @@ -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(' ')