validate:launcher: Use the number of failed test as exit code

We used to always return 0, which was not right!
This commit is contained in:
Thibault Saunier 2017-08-18 11:37:28 -03:00
parent cb99482b9a
commit 2c6c25d4bf
3 changed files with 6 additions and 4 deletions

View file

@ -1680,7 +1680,7 @@ class _TestsLauncher(Loggable):
return self._run_tests()
def final_report(self):
self.reporter.final_report()
return self.reporter.final_report()
def needs_http_server(self):
for tester in self.testers:

View file

@ -594,11 +594,11 @@ Note that all testsuite should be inside python modules, so the directory should
exception = e
pass
finally:
tests_launcher.final_report()
res = tests_launcher.final_report()
tests_launcher.clean_tests()
httpsrv.stop()
vfb_server.stop()
if exception is not None:
raise exception
return 0
return res

View file

@ -125,6 +125,8 @@ class Reporter(Loggable):
printc("%sTotal: %d" % (lenstat * " ", total), color)
return self.stats["failures"]
class XunitReporter(Reporter):
@ -139,7 +141,7 @@ class XunitReporter(Reporter):
def final_report(self):
self.report()
super(XunitReporter, self).final_report()
return super(XunitReporter, self).final_report()
def _get_captured(self, test):
captured = ""