From d8c0d42f03849a0677babe763df73f75291f9a6a Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 20 Jun 2012 10:03:13 +0200 Subject: Add a simple test for exported phase functions. --- pmstestsuite/library/standard/__init__.py | 1 + pmstestsuite/library/standard/eclass_exports.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pmstestsuite/library/standard/eclass_exports.py diff --git a/pmstestsuite/library/standard/__init__.py b/pmstestsuite/library/standard/__init__.py index 3e87200..211937f 100644 --- a/pmstestsuite/library/standard/__init__.py +++ b/pmstestsuite/library/standard/__init__.py @@ -25,6 +25,7 @@ class StandardTestLibrary(TestLibrary): 'eclass_depend.DependInheritanceTest', 'eclass_depend.PDependInheritanceTest', 'eclass_depend.RDependInheritanceTest', + 'eclass_exports.ExportedPhaseFunctionTest', 'eclass_metadata.EclassDefinedPhasesTest', 'eclass_metadata.IUseInheritanceTest', 'phase_function_order.PhaseFunctionOrderTest', diff --git a/pmstestsuite/library/standard/eclass_exports.py b/pmstestsuite/library/standard/eclass_exports.py new file mode 100644 index 0000000..4496747 --- /dev/null +++ b/pmstestsuite/library/standard/eclass_exports.py @@ -0,0 +1,23 @@ +# vim:fileencoding=utf-8 +# (c) 2011 Michał Górny +# Released under the terms of the 2-clause BSD license. + +from abc import abstractproperty + +from pmstestsuite.library.eclass_case import EclassTestCase + +class ExportedPhaseFunctionTest(EclassTestCase): + """ Check whether EXPORTED_FUNCTIONS are used. """ + + @property + def eclass_contents(self): + return ''' +EXPORT_FUNCTIONS src_unpack + +%s_src_unpack() { + pms-test_dbus_append_result 'working' +} +''' % self.pn + + def check_dbus_result(self, output, pm): + self.assertEqual(output[0], 'working', 'EXPORT_FUNCTIONS') -- cgit v1.2.3-65-gdbad