1 |
commit: cd697e0de50e85efea819a884cc353a8b5101e5b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 31 17:17:59 2011 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 31 18:01:35 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=cd697e0d |
7 |
|
8 |
Introduce DBusEbuildTestCase. |
9 |
|
10 |
--- |
11 |
basic/phase_function_order.py | 5 +++-- |
12 |
dbus_case.py | 21 +++++++++++++++++++++ |
13 |
2 files changed, 24 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/basic/phase_function_order.py b/basic/phase_function_order.py |
16 |
index 80a1c4e..c8ca950 100644 |
17 |
--- a/basic/phase_function_order.py |
18 |
+++ b/basic/phase_function_order.py |
19 |
@@ -2,9 +2,10 @@ |
20 |
# (c) 2011 Michał Górny <mgorny@g.o> |
21 |
# Released under the terms of the 2-clause BSD license. |
22 |
|
23 |
-from PMSTestSuite.library.case import EbuildTestCase, phase_func_names |
24 |
+from PMSTestSuite.library.case import phase_func_names |
25 |
+from PMSTestSuite.library.standard.dbus_case import DBusEbuildTestCase |
26 |
|
27 |
-class PhaseFunctionOrderTest(EbuildTestCase): |
28 |
+class PhaseFunctionOrderTest(DBusEbuildTestCase): |
29 |
relevant_eapis = (0, 2, 4) |
30 |
|
31 |
ebuild_vars = { |
32 |
|
33 |
diff --git a/dbus_case.py b/dbus_case.py |
34 |
new file mode 100644 |
35 |
index 0000000..8e9db92 |
36 |
--- /dev/null |
37 |
+++ b/dbus_case.py |
38 |
@@ -0,0 +1,21 @@ |
39 |
+# vim:fileencoding=utf-8 |
40 |
+# (c) 2011 Michał Górny <mgorny@g.o> |
41 |
+# Released under the terms of the 2-clause BSD license. |
42 |
+ |
43 |
+from PMSTestSuite.library.case import EbuildTestCase |
44 |
+from PMSTestSuite.dbus_handler import DBusHandler, RunningTest |
45 |
+ |
46 |
+dbus_handler = DBusHandler() |
47 |
+ |
48 |
+class DBusEbuildTestCase(EbuildTestCase): |
49 |
+ """ D-Bus capable base test case. """ |
50 |
+ dbus_output = [] |
51 |
+ |
52 |
+ def __init__(self, *args, **kwargs): |
53 |
+ """ Initialize the test case and the D-Bus object for it. """ |
54 |
+ EbuildTestCase.__init__(self, *args, **kwargs) |
55 |
+ dbus_handler.add_test(self) |
56 |
+ |
57 |
+ def check_result(self, res): |
58 |
+ print(self.dbus_output) |
59 |
+ raise NotImplementedError('XXX') |