test: fix result printing
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 27 Jul 2018 09:40:11 +0000 (10:40 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 31 Jul 2018 12:53:24 +0000 (14:53 +0200)
Previously, printing was done using tuple syntax, which caused
output to appear as a tuple as opposed to being one string. Fix
this by using addition operator instead.

Fixes: 54ca545dce4b ("make python scripts python2/3 compliant")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
test/test/autotest_runner.py

index a692f06..b09b578 100644 (file)
@@ -247,7 +247,7 @@ class AutotestRunner:
 
             # don't print out total time every line, it's the same anyway
             if i == len(results) - 1:
-                print(result,
+                print(result +
                       "[%02dm %02ds]" % (total_time / 60, total_time % 60))
             else:
                 print(result)
@@ -332,8 +332,8 @@ class AutotestRunner:
 
             # create table header
             print("")
-            print("Test name".ljust(30), "Test result".ljust(29),
-                  "Test".center(9), "Total".center(9))
+            print("Test name".ljust(30) + "Test result".ljust(29) +
+                  "Test".center(9) + "Total".center(9))
             print("=" * 80)
 
             # make a note of tests start time