diff options
Diffstat (limited to 'pmstestsuite/library')
-rw-r--r-- | pmstestsuite/library/depend_case.py | 22 | ||||
-rw-r--r-- | pmstestsuite/library/standard/dbus_case.py | 8 |
2 files changed, 24 insertions, 6 deletions
diff --git a/pmstestsuite/library/depend_case.py b/pmstestsuite/library/depend_case.py index 55e49cc..0d4f8e7 100644 --- a/pmstestsuite/library/depend_case.py +++ b/pmstestsuite/library/depend_case.py @@ -118,8 +118,17 @@ class EbuildDependencyTestCase(BaseDependencyTestCase, EbuildTestCase): return of def check_result(self, pm): + try: + BaseDependencyTestCase.check_result(self, pm) + except AssertionError as e: + exc = e + else: + exc = None + EbuildTestCase.check_result(self, pm) - BaseDependencyTestCase.check_result(self, pm) + + if exc is not None: + raise exc class EclassDependencyTestCase(BaseDependencyTestCase, EclassTestCase): """ @@ -180,5 +189,14 @@ class EclassDependencyTestCase(BaseDependencyTestCase, EclassTestCase): return of def check_result(self, pm): + try: + BaseDependencyTestCase.check_result(self, pm) + except AssertionError as e: + exc = e + else: + exc = None + EclassTestCase.check_result(self, pm) - BaseDependencyTestCase.check_result(self, pm) + + if exc is not None: + raise exc diff --git a/pmstestsuite/library/standard/dbus_case.py b/pmstestsuite/library/standard/dbus_case.py index 7d1b46f..a76bba4 100644 --- a/pmstestsuite/library/standard/dbus_case.py +++ b/pmstestsuite/library/standard/dbus_case.py @@ -151,9 +151,9 @@ class DBusEbuildDependencyTestCase(DBusBaseTestCase, EbuildDependencyTestCase): EbuildDependencyTestCase.check_result(self, pm) def check_result(self, pm): - self.assertBool(not self.expect_failure, self.dbus_started, - 'build started') + started = self.dbus_started self.check_dbus_result(self._pop_dbus_output(), pm) + self.assertBool(not self.expect_failure, started, 'build started') class DBusEclassDependencyTestCase(DBusBaseTestCase, EclassDependencyTestCase): """ D-Bus capable eclass dependency test case. """ @@ -167,6 +167,6 @@ class DBusEclassDependencyTestCase(DBusBaseTestCase, EclassDependencyTestCase): EclassDependencyTestCase.check_result(self, pm) def check_result(self, pm): - self.assertBool(not self.expect_failure, self.dbus_started, - 'build started') + started = self.dbus_started self.check_dbus_result(self._pop_dbus_output(), pm) + self.assertBool(not self.expect_failure, started, 'build started') |