1 |
commit: 83babec5591836f69120e6e43fe3af5c3f4ca173 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 28 14:04:22 2011 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 28 16:12:53 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=83babec5 |
7 |
|
8 |
Add a test for the AA variable. |
9 |
|
10 |
--- |
11 |
pmstestsuite/library/standard/__init__.py | 1 + |
12 |
pmstestsuite/library/standard/deprecated_vars.py | 29 ++++++++++++++++++++++ |
13 |
pmstestsuite/library/standard/special_vars.py | 1 - |
14 |
3 files changed, 30 insertions(+), 1 deletions(-) |
15 |
|
16 |
diff --git a/pmstestsuite/library/standard/__init__.py b/pmstestsuite/library/standard/__init__.py |
17 |
index 20f8e4f..68d9434 100644 |
18 |
--- a/pmstestsuite/library/standard/__init__.py |
19 |
+++ b/pmstestsuite/library/standard/__init__.py |
20 |
@@ -20,6 +20,7 @@ class StandardTestLibrary(TestLibrary): |
21 |
'depend.PDependTest', |
22 |
'depend.FailingDependTest', |
23 |
'depend.FailingRDependTest', |
24 |
+ 'deprecated_vars.AATest', |
25 |
'special_vars.InheritedVariableTest', |
26 |
'special_vars.RDependFallbackTest', |
27 |
'special_vars.DefinedPhasesTest', |
28 |
|
29 |
diff --git a/pmstestsuite/library/standard/deprecated_vars.py b/pmstestsuite/library/standard/deprecated_vars.py |
30 |
new file mode 100644 |
31 |
index 0000000..5db24ef |
32 |
--- /dev/null |
33 |
+++ b/pmstestsuite/library/standard/deprecated_vars.py |
34 |
@@ -0,0 +1,29 @@ |
35 |
+# vim:fileencoding=utf-8 |
36 |
+# (c) 2011 Michał Górny <mgorny@g.o> |
37 |
+# Released under the terms of the 2-clause BSD license. |
38 |
+ |
39 |
+from pmstestsuite.library.standard.dbus_case import DBusEbuildTestCase |
40 |
+ |
41 |
+class AATest(DBusEbuildTestCase): |
42 |
+ """ Test whether AA is declared. """ |
43 |
+ |
44 |
+ relevant_eapis = (3, 4) |
45 |
+ ebuild_vars = { |
46 |
+ 'IUSE': 'pms_tests_magical_hidden_use', # XXX? |
47 |
+ 'SRC_URI': '''pms_tests_magical_hidden_use? ( |
48 |
+ http://www.gentoo.org/ -> pms-test-suite-dummy.html )''' |
49 |
+ } |
50 |
+ phase_funcs = { |
51 |
+ 'src_unpack': [ |
52 |
+ 'pms-test-dbus_append_result "${AA}"' |
53 |
+ ] |
54 |
+ } |
55 |
+ |
56 |
+ def check_dbus_result(self, output, pm): |
57 |
+ if self.eapi < 4: |
58 |
+ expect = 'pms-test-suite-dummy.html' |
59 |
+ else: |
60 |
+ expect = '' |
61 |
+ |
62 |
+ return output == expect \ |
63 |
+ and DBusEbuildTestCase.check_dbus_result(self, output, pm) |
64 |
|
65 |
diff --git a/pmstestsuite/library/standard/special_vars.py b/pmstestsuite/library/standard/special_vars.py |
66 |
index fa01bc2..2a38897 100644 |
67 |
--- a/pmstestsuite/library/standard/special_vars.py |
68 |
+++ b/pmstestsuite/library/standard/special_vars.py |
69 |
@@ -50,4 +50,3 @@ class DefinedPhasesTest(DBusEbuildTestCase): |
70 |
phases = pm.vdb[self.cpv].DEFINED_PHASES.split() |
71 |
return (' '.join(phases) == 'setup') \ |
72 |
and DBusEbuildTestCase.check_dbus_result(self, output, pm) |
73 |
- |