mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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:
parent
cb99482b9a
commit
2c6c25d4bf
3 changed files with 6 additions and 4 deletions
|
@ -1680,7 +1680,7 @@ class _TestsLauncher(Loggable):
|
||||||
return self._run_tests()
|
return self._run_tests()
|
||||||
|
|
||||||
def final_report(self):
|
def final_report(self):
|
||||||
self.reporter.final_report()
|
return self.reporter.final_report()
|
||||||
|
|
||||||
def needs_http_server(self):
|
def needs_http_server(self):
|
||||||
for tester in self.testers:
|
for tester in self.testers:
|
||||||
|
|
|
@ -594,11 +594,11 @@ Note that all testsuite should be inside python modules, so the directory should
|
||||||
exception = e
|
exception = e
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
tests_launcher.final_report()
|
res = tests_launcher.final_report()
|
||||||
tests_launcher.clean_tests()
|
tests_launcher.clean_tests()
|
||||||
httpsrv.stop()
|
httpsrv.stop()
|
||||||
vfb_server.stop()
|
vfb_server.stop()
|
||||||
if exception is not None:
|
if exception is not None:
|
||||||
raise exception
|
raise exception
|
||||||
|
|
||||||
return 0
|
return res
|
||||||
|
|
|
@ -125,6 +125,8 @@ class Reporter(Loggable):
|
||||||
|
|
||||||
printc("%sTotal: %d" % (lenstat * " ", total), color)
|
printc("%sTotal: %d" % (lenstat * " ", total), color)
|
||||||
|
|
||||||
|
return self.stats["failures"]
|
||||||
|
|
||||||
|
|
||||||
class XunitReporter(Reporter):
|
class XunitReporter(Reporter):
|
||||||
|
|
||||||
|
@ -139,7 +141,7 @@ class XunitReporter(Reporter):
|
||||||
|
|
||||||
def final_report(self):
|
def final_report(self):
|
||||||
self.report()
|
self.report()
|
||||||
super(XunitReporter, self).final_report()
|
return super(XunitReporter, self).final_report()
|
||||||
|
|
||||||
def _get_captured(self, test):
|
def _get_captured(self, test):
|
||||||
captured = ""
|
captured = ""
|
||||||
|
|
Loading…
Reference in a new issue