aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-01-02 23:27:06 +0100
committerMichał Górny <mgorny@gentoo.org>2012-01-02 23:27:06 +0100
commitaab56e031241f43cd811e5ab2bdacd12950d3d17 (patch)
treef6247a2b560d02875306c99efbdac1a675a4c365
parentMerge D-Bus into main case classes. (diff)
downloadpms-test-suite-aab56e031241f43cd811e5ab2bdacd12950d3d17.tar.gz
pms-test-suite-aab56e031241f43cd811e5ab2bdacd12950d3d17.tar.bz2
pms-test-suite-aab56e031241f43cd811e5ab2bdacd12950d3d17.zip
Introduce expect_started to fix D-Bus dependency cases.
-rw-r--r--pmstestsuite/library/case.py8
-rw-r--r--pmstestsuite/library/depend_case.py1
2 files changed, 8 insertions, 1 deletions
diff --git a/pmstestsuite/library/case.py b/pmstestsuite/library/case.py
index 90406a0..e007cf6 100644
--- a/pmstestsuite/library/case.py
+++ b/pmstestsuite/library/case.py
@@ -451,6 +451,10 @@ class EbuildTestCase(TestCase):
to merge successfully. Otherwise, the test ebuild is supposed to fail
to merge (die)
@type expect_failure: bool
+ @ivar expect_started: if set to True (the default), the test is supposed
+ to be started (ack via D-Bus). Otherwise, the test ebuild is supposed
+ to not ever start
+ @type expect_started: bool
@ivar inherits: additional eclasses to inherit
@type inherits: list (string)
@ivar phase_funcs: phase function contents
@@ -459,6 +463,7 @@ class EbuildTestCase(TestCase):
ebuild_vars = {}
expect_failure = False
+ expect_started = True
inherits = []
phase_funcs = {}
@@ -694,5 +699,6 @@ class EbuildTestCase(TestCase):
merged = self.atom(pm) in pm.installed
self.assertBool(not self.expect_failure, merged,
'package merged')
- self.assertTrue(self.dbus_started, 'build started')
+ self.assertBool(self.expect_started, self.dbus_started,
+ 'build started')
self.check_dbus_result(self._pop_dbus_output(), pm)
diff --git a/pmstestsuite/library/depend_case.py b/pmstestsuite/library/depend_case.py
index 3f34ca7..d03f973 100644
--- a/pmstestsuite/library/depend_case.py
+++ b/pmstestsuite/library/depend_case.py
@@ -67,6 +67,7 @@ class BaseDependencyTestCase(object):
"""
self.dependant_ebuilds = []
+ self.expect_started = not self.expect_failure
for class_list, v in ((self.depend_classes, 'DEPEND'),
(self.rdepend_classes, 'RDEPEND'),