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/
Date: Tue, 31 May 2011 17:20:05
Message-Id: 6c74f6434db0c985c7c0b0afaec7227e4e5f139c.mgorny@gentoo
1 commit: 6c74f6434db0c985c7c0b0afaec7227e4e5f139c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 17:12:36 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 17:17:32 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=6c74f643
7
8 Use actual tests in dbus_handler.
9
10 ---
11 PMSTestSuite/dbus_handler.py | 16 ++++++++--------
12 1 files changed, 8 insertions(+), 8 deletions(-)
13
14 diff --git a/PMSTestSuite/dbus_handler.py b/PMSTestSuite/dbus_handler.py
15 index f19c098..89e2ac5 100644
16 --- a/PMSTestSuite/dbus_handler.py
17 +++ b/PMSTestSuite/dbus_handler.py
18 @@ -11,23 +11,23 @@ dbus_object_prefix = '/org/gentoo/PMSTestSuite'
19 class RunningTest(dbus.service.Object):
20 """ A class encapsulating a running test. """
21
22 - def __init__(self, test_name, parent):
23 + def __init__(self, test, parent):
24 """
25 - Initialize the object for test <test_name>, for DBusHandler <parent>.
26 + Initialize the object for test <test>, for DBusHandler <parent>.
27 """
28 - self.test_name = test_name
29 - self.output = []
30 + self.test = test
31 dbus.service.Object.__init__(
32 + self,
33 parent.bus,
34 - '%s/%s' % (dbus_object_prefix, test_name)
35 + '%s/%s' % (dbus_object_prefix, test.p.replace('-', '_'))
36 )
37
38 @dbus.service.method(
39 dbus_interface=dbus_interface_name,
40 - in_signature='ss', out_signature='')
41 + in_signature='s', out_signature='')
42 def append_output(self, l):
43 """ Append the line <l> to the test output. """
44 - self.output.append(l)
45 + self.test.dbus_output.append(l)
46
47 class DBusHandler(object):
48 """ A class handling all D-Bus interaction for PMS Test Suite. """
49 @@ -40,4 +40,4 @@ class DBusHandler(object):
50
51 def add_test(self, test):
52 """ Add the object for <test> to the handler. """
53 - test._dbusobj = RunningTest(test.pn, self)
54 + test._dbusobj = RunningTest(test, self)