From b1448311c2a45c7b2d1419b80c249cea3052c3a7 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 29 Dec 2013 16:45:47 +0200 Subject: [PATCH] tests: Show test counter on the START line This makes it more convenient to figure out how far a test cycle is from live logs. Signed-hostap: Jouni Malinen --- tests/hwsim/run-tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 5802a31ea..90c99b3d1 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -265,6 +265,7 @@ def main(): from random import shuffle shuffle(tests_to_run) + count = 0 for t in tests_to_run: name = t.__name__.replace('test_', '', 1) if log_handler: @@ -278,9 +279,11 @@ def main(): reset_ok = True with DataCollector(args.logdir, name, args.tracing, args.dmesg): - logger.info("START " + name) + count = count + 1 + msg = "START {} {}/{}".format(name, count, len(tests_to_run)) + logger.info(msg) if args.loglevel == logging.WARNING: - print "START " + name + print msg sys.stdout.flush() if t.__doc__: logger.info("Test: " + t.__doc__)