Patchwork hwsim tests: print failed tests nicer

login
register
mail settings
Submitter Johannes Berg
Date Nov. 11, 2013, 4:19 p.m.
Message ID <1384186773-11748-1-git-send-email-johannes@sipsolutions.net>
Download mbox | patch
Permalink /patch/290378/
State Accepted
Headers show

Comments

Johannes Berg - Nov. 11, 2013, 4:19 p.m.
From: Johannes Berg <johannes.berg@intel.com>

There's no reason to format the failed tests as a python
list, just print a (space-separated) list of test names.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
---
 tests/hwsim/run-tests.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Jouni Malinen - Nov. 17, 2013, 4:21 p.m.
On Mon, Nov 11, 2013 at 05:19:33PM +0100, Johannes Berg wrote:
> There's no reason to format the failed tests as a python
> list, just print a (space-separated) list of test names.

Thanks, applied.

Patch

diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index 83009f1..697fd6f 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -372,9 +372,9 @@  def main():
     if len(failed):
         logger.info("passed {} test case(s)".format(len(passed)))
         logger.info("skipped {} test case(s)".format(len(skipped)))
-        logger.info("failed tests: " + str(failed))
+        logger.info("failed tests: " + ' '.join(failed))
         if args.loglevel == logging.WARNING:
-            print "failed tests: " + str(failed)
+            print "failed tests: " + ' '.join(failed)
         sys.exit(1)
     logger.info("passed all {} test case(s)".format(len(passed)))
     if len(skipped):