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/library/standard/
Date: Tue, 28 Jun 2011 16:16:07
Message-Id: f8c50928d8409275b64573092a80a44aa70ae9c8.mgorny@gentoo
1 commit: f8c50928d8409275b64573092a80a44aa70ae9c8
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 28 16:16:16 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 28 16:16:16 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=f8c50928
7
8 Add a test for KV variable.
9
10 ---
11 pmstestsuite/library/standard/__init__.py | 1 +
12 pmstestsuite/library/standard/deprecated_vars.py | 14 ++++++++++++++
13 2 files changed, 15 insertions(+), 0 deletions(-)
14
15 diff --git a/pmstestsuite/library/standard/__init__.py b/pmstestsuite/library/standard/__init__.py
16 index 68d9434..79f4082 100644
17 --- a/pmstestsuite/library/standard/__init__.py
18 +++ b/pmstestsuite/library/standard/__init__.py
19 @@ -21,6 +21,7 @@ class StandardTestLibrary(TestLibrary):
20 'depend.FailingDependTest',
21 'depend.FailingRDependTest',
22 'deprecated_vars.AATest',
23 + 'deprecated_vars.KVTest',
24 'special_vars.InheritedVariableTest',
25 'special_vars.RDependFallbackTest',
26 'special_vars.DefinedPhasesTest',
27
28 diff --git a/pmstestsuite/library/standard/deprecated_vars.py b/pmstestsuite/library/standard/deprecated_vars.py
29 index 5db24ef..c4c72a3 100644
30 --- a/pmstestsuite/library/standard/deprecated_vars.py
31 +++ b/pmstestsuite/library/standard/deprecated_vars.py
32 @@ -27,3 +27,17 @@ class AATest(DBusEbuildTestCase):
33
34 return output == expect \
35 and DBusEbuildTestCase.check_dbus_result(self, output, pm)
36 +
37 +class KVTest(DBusEbuildTestCase):
38 + """ Test whether KV is declared. """
39 +
40 + relevant_eapis = (3, 4)
41 + phase_funcs = {
42 + 'src_compile': [
43 + 'pms-test-dbus_append_result "${KV}"'
44 + ]
45 + }
46 +
47 + def check_dbus_result(self, output, pm):
48 + return bool(output) ^ (self.eapi == 4) \
49 + and DBusEbuildTestCase.check_dbus_result(self, output, pm)