diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-06-20 10:03:13 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-06-20 10:03:13 +0200 |
commit | d8c0d42f03849a0677babe763df73f75291f9a6a (patch) | |
tree | 823a3af01f7cf33fbc897e398ed74cd69a628ac2 | |
parent | Fix failure exit from first stage. (diff) | |
download | pms-test-suite-d8c0d42f03849a0677babe763df73f75291f9a6a.tar.gz pms-test-suite-d8c0d42f03849a0677babe763df73f75291f9a6a.tar.bz2 pms-test-suite-d8c0d42f03849a0677babe763df73f75291f9a6a.zip |
Add a simple test for exported phase functions.
-rw-r--r-- | pmstestsuite/library/standard/__init__.py | 1 | ||||
-rw-r--r-- | pmstestsuite/library/standard/eclass_exports.py | 23 |
2 files changed, 24 insertions, 0 deletions
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 <mgorny@gentoo.org> +# 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') |