diff options
Diffstat (limited to 'pmstestsuite/repository/pms_eclass.py')
-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(): |