diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-01-02 21:28:44 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-01-02 21:55:41 +0100 |
commit | efe9fbbe65d0114724b99e016a931902618cc9c7 (patch) | |
tree | 49423fe0276c89bbc63df8202e15925408928d46 /pmstestsuite/repository | |
parent | Fill in the actual name in COPYING. (diff) | |
download | pms-test-suite-efe9fbbe65d0114724b99e016a931902618cc9c7.tar.gz pms-test-suite-efe9fbbe65d0114724b99e016a931902618cc9c7.tar.bz2 pms-test-suite-efe9fbbe65d0114724b99e016a931902618cc9c7.zip |
Integrate D-Bus code into the main eclass.
Diffstat (limited to 'pmstestsuite/repository')
-rw-r--r-- | pmstestsuite/repository/pms_eclass.py | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/pmstestsuite/repository/pms_eclass.py b/pmstestsuite/repository/pms_eclass.py index 99cbc5e..9be1ee0 100644 --- a/pmstestsuite/repository/pms_eclass.py +++ b/pmstestsuite/repository/pms_eclass.py @@ -1,13 +1,15 @@ # vim:fileencoding=utf-8 -# (c) 2011 Michał Górny <mgorny@gentoo.org> +# (c) 2011-2012 Michał Górny <mgorny@gentoo.org> # Released under the terms of the 2-clause BSD license. import os.path -eclass_contents = """# Copyright 1999-2011 Gentoo Foundation +eclass_contents = """# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ +EXPORT_FUNCTIONS pkg_setup + HOMEPAGE="http://www.gentoo.org/proj/en/qa/pms/pms-test-suite.xml" SRC_URI="" @@ -15,8 +17,35 @@ LICENSE="as-is" SLOT=${PV} IUSE="" +DEPEND="sys-apps/dbus" + RESTRICT="mirror" S=${WORKDIR} + +pms-test_dbus_call() { + local method=${1} + shift + + PMS_TEST_DBUS_P=${P//-/_} + dbus-send \\ + --system \\ + --print-reply \\ + --type=method_call \\ + --dest=org.gentoo.pmstestsuite \\ + /org/gentoo/pmstestsuite/${PMS_TEST_DBUS_P} \\ + org.gentoo.pmstestsuite.${method} \\ + "${@}" +} + +pms-test_dbus_append_result() { + pms-test_dbus_call append_output \\ + string:"${*}" \\ + || die 'Failed to append the test result using dbus' +} + +pms-test_pkg_setup() { + pms-test_dbus_call test_started +} """ def get_common_eclass_files(): |