[dpdk-dev] [PATCH 11/22] app: fix autotest summary in error cases
Thomas Monjalon
thomas.monjalon at 6wind.com
Wed Mar 20 17:04:59 CET 2013
It was reporting "All test OK" even if previous tests (except the last
one) were failed.
Acked-by: Ivan Boule <ivan.boule at 6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
---
app/test/autotest.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/test/autotest.py b/app/test/autotest.py
index 2609142..6613897 100755
--- a/app/test/autotest.py
+++ b/app/test/autotest.py
@@ -143,6 +143,7 @@ class AutoTest:
self.report_list.append(report)
def gen_report(self):
+ fails = 0
for report in self.report_list:
# main report header and stats
self.literal = 0
@@ -186,15 +187,17 @@ class AutoTest:
reportlog.write(s)
reportlog.close()
+ if report["fails"] > 0:
+ fails += 1
# displayed on console
print
print "-------------------------"
print
- if report["fails"] == 0:
+ if fails == 0:
print "All test OK"
else:
- print "%s test(s) failed"%(report["fails"])
+ print "%s test(s) failed" % fails
# file API, to store logs from pexpect
def write(self, buf):
--
1.7.2.5
More information about the dev
mailing list