Commit 1e0bc96a authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Pavel Emelyanov

zdtm.py: fix overall return code for --keep-going option

Signed-off-by: 's avatarSergey Bronnikov <sergeyb@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 70cb4326
...@@ -1082,12 +1082,11 @@ class launcher: ...@@ -1082,12 +1082,11 @@ class launcher:
if pid != 0: if pid != 0:
sub = self.__subs.pop(pid) sub = self.__subs.pop(pid)
if status != 0: if status != 0:
self.__fail = True
failed_flavor = decode_flav(os.WEXITSTATUS(status)) failed_flavor = decode_flav(os.WEXITSTATUS(status))
if self.__file_report: if self.__file_report:
testline = "not ok %d - %s # flavor %s" % (self.__runtest, sub['name'], failed_flavor) testline = "not ok %d - %s # flavor %s" % (self.__runtest, sub['name'], failed_flavor)
print >> self.__file_report, testline print >> self.__file_report, testline
if not opts['keep_going']:
self.__fail = True
if sub['log']: if sub['log']:
add_to_report(sub['log'], sub['name'].replace('/', '_') + "_" + failed_flavor + "/output") add_to_report(sub['log'], sub['name'].replace('/', '_') + "_" + failed_flavor + "/output")
else: else:
...@@ -1112,12 +1111,12 @@ class launcher: ...@@ -1112,12 +1111,12 @@ class launcher:
while self.__subs: while self.__subs:
if not self.__wait_one(os.WNOHANG): if not self.__wait_one(os.WNOHANG):
break break
if self.__fail: if self.__fail and not opts['keep_going']:
raise test_fail_exc('') raise test_fail_exc('')
def wait_all(self): def wait_all(self):
self.__wait_all() self.__wait_all()
if self.__fail: if self.__fail and not opts['keep_going']:
raise test_fail_exc('') raise test_fail_exc('')
def finish(self): def finish(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment