Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/
Date: Mon, 02 Jan 2012 22:26:36
Message-Id: aab56e031241f43cd811e5ab2bdacd12950d3d17.mgorny@gentoo
1 commit: aab56e031241f43cd811e5ab2bdacd12950d3d17
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 22:27:06 2012 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 22:27:06 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=aab56e03
7
8 Introduce expect_started to fix D-Bus dependency cases.
9
10 ---
11 pmstestsuite/library/case.py | 8 +++++++-
12 pmstestsuite/library/depend_case.py | 1 +
13 2 files changed, 8 insertions(+), 1 deletions(-)
14
15 diff --git a/pmstestsuite/library/case.py b/pmstestsuite/library/case.py
16 index 90406a0..e007cf6 100644
17 --- a/pmstestsuite/library/case.py
18 +++ b/pmstestsuite/library/case.py
19 @@ -451,6 +451,10 @@ class EbuildTestCase(TestCase):
20 to merge successfully. Otherwise, the test ebuild is supposed to fail
21 to merge (die)
22 @type expect_failure: bool
23 + @ivar expect_started: if set to True (the default), the test is supposed
24 + to be started (ack via D-Bus). Otherwise, the test ebuild is supposed
25 + to not ever start
26 + @type expect_started: bool
27 @ivar inherits: additional eclasses to inherit
28 @type inherits: list (string)
29 @ivar phase_funcs: phase function contents
30 @@ -459,6 +463,7 @@ class EbuildTestCase(TestCase):
31
32 ebuild_vars = {}
33 expect_failure = False
34 + expect_started = True
35 inherits = []
36 phase_funcs = {}
37
38 @@ -694,5 +699,6 @@ class EbuildTestCase(TestCase):
39 merged = self.atom(pm) in pm.installed
40 self.assertBool(not self.expect_failure, merged,
41 'package merged')
42 - self.assertTrue(self.dbus_started, 'build started')
43 + self.assertBool(self.expect_started, self.dbus_started,
44 + 'build started')
45 self.check_dbus_result(self._pop_dbus_output(), pm)
46
47 diff --git a/pmstestsuite/library/depend_case.py b/pmstestsuite/library/depend_case.py
48 index 3f34ca7..d03f973 100644
49 --- a/pmstestsuite/library/depend_case.py
50 +++ b/pmstestsuite/library/depend_case.py
51 @@ -67,6 +67,7 @@ class BaseDependencyTestCase(object):
52 """
53
54 self.dependant_ebuilds = []
55 + self.expect_started = not self.expect_failure
56
57 for class_list, v in ((self.depend_classes, 'DEPEND'),
58 (self.rdepend_classes, 'RDEPEND'),