
Signed-off-by: fu.lin <fulin10@huawei.com> --- test/zdtm.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/zdtm.py b/test/zdtm.py index dff64d4..bd44ad1 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # vim: noet ts=8 sw=8 sts=8 from __future__ import absolute_import, division, print_function, unicode_literals @@ -2102,7 +2103,8 @@ class Launcher: if self.__fail: print_sep("FAIL", "#") - sys.exit(1) + + return self.__fail def all_tests(opts): @@ -2356,10 +2358,11 @@ def run_tests(opts): else: launcher.skip(t, "no flavors") finally: - launcher.finish() + fail = launcher.finish() if opts['join_ns']: subprocess.Popen(["ip", "netns", "delete", "zdtm_netns"]).wait() - + if fail: + sys.exit(1) sti_fmt = "%-40s%-10s%s" -- 2.27.0