summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2019-11-11 20:33:36 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-14 13:21:00 +0000
commit7fcb703894cc5ebb379a33bfeb24fc1906afc502 (patch)
treef3fab5ae5e0223baa86451480f6a3ba89fa85af4 /meta/lib
parent9eab3f9926d4dcb41748ac25fd451e312e6b4437 (diff)
downloadpoky-7fcb703894cc5ebb379a33bfeb24fc1906afc502.tar.gz
oeqa/selftest/oescripts: move list-packageconfig-flags tests from manual to self
(From OE-Core rev: f55bfde64bd7b6f862ca7b59eb075b862d221f12) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/oescripts.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index 80d8b2c4cc..41cbe04808 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -65,6 +65,7 @@ class OEPybootchartguyTests(OEScriptTests):
65 runCmd('%s/pybootchartgui/pybootchartgui.py %s -o %s/charts -f pdf' % (self.scripts_dir, self.buildstats, self.tmpdir)) 65 runCmd('%s/pybootchartgui/pybootchartgui.py %s -o %s/charts -f pdf' % (self.scripts_dir, self.buildstats, self.tmpdir))
66 self.assertTrue(os.path.exists(self.tmpdir + "/charts.pdf")) 66 self.assertTrue(os.path.exists(self.tmpdir + "/charts.pdf"))
67 67
68
68class OEGitproxyTests(OESelftestTestCase): 69class OEGitproxyTests(OESelftestTestCase):
69 70
70 scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts') 71 scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts')
@@ -127,3 +128,61 @@ class OeRunNativeTest(OESelftestTestCase):
127 bitbake("qemu-helper-native -c addto_recipe_sysroot") 128 bitbake("qemu-helper-native -c addto_recipe_sysroot")
128 result = runCmd("oe-run-native qemu-helper-native tunctl -h") 129 result = runCmd("oe-run-native qemu-helper-native tunctl -h")
129 self.assertIn("Delete: tunctl -d device-name [-f tun-clone-device]", result.output) 130 self.assertIn("Delete: tunctl -d device-name [-f tun-clone-device]", result.output)
131
132class OEListPackageconfigTests(OEScriptTests):
133 #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
134 def check_endlines(self, results, expected_endlines):
135 for line in results.output.splitlines():
136 for el in expected_endlines:
137 if line == el:
138 expected_endlines.remove(el)
139 break
140
141 if expected_endlines:
142 self.fail('Missing expected listings:\n %s' % '\n '.join(expected_endlines))
143
144
145 #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
146 def test_packageconfig_flags_help(self):
147 runCmd('%s/contrib/list-packageconfig-flags.py -h' % self.scripts_dir)
148
149 def test_packageconfig_flags_default(self):
150 results = runCmd('%s/contrib/list-packageconfig-flags.py' % self.scripts_dir)
151 expected_endlines = []
152 expected_endlines.append("RECIPE NAME PACKAGECONFIG FLAGS")
153 expected_endlines.append("pinentry gtk2 libcap ncurses qt secret")
154 expected_endlines.append("tar acl")
155
156 self.check_endlines(results, expected_endlines)
157
158
159 def test_packageconfig_flags_option_flags(self):
160 results = runCmd('%s/contrib/list-packageconfig-flags.py -f' % self.scripts_dir)
161 expected_endlines = []
162 expected_endlines.append("PACKAGECONFIG FLAG RECIPE NAMES")
163 expected_endlines.append("qt nativesdk-pinentry pinentry pinentry-native")
164 expected_endlines.append("secret nativesdk-pinentry pinentry pinentry-native")
165
166 self.check_endlines(results, expected_endlines)
167
168 def test_packageconfig_flags_option_all(self):
169 results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir)
170 expected_endlines = []
171 expected_endlines.append("pinentry-1.1.0")
172 expected_endlines.append("PACKAGECONFIG ncurses libcap")
173 expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase")
174 expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0")
175 expected_endlines.append("PACKAGECONFIG[libcap] --with-libcap, --without-libcap, libcap")
176 expected_endlines.append("PACKAGECONFIG[ncurses] --enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses")
177 expected_endlines.append("PACKAGECONFIG[secret] --enable-libsecret, --disable-libsecret, libsecret")
178
179 self.check_endlines(results, expected_endlines)
180
181 def test_packageconfig_flags_optiins_preferred_only(self):
182 results = runCmd('%s/contrib/list-packageconfig-flags.py -p' % self.scripts_dir)
183 expected_endlines = []
184 expected_endlines.append("RECIPE NAME PACKAGECONFIG FLAGS")
185 expected_endlines.append("pinentry gtk2 libcap ncurses qt secret")
186
187 self.check_endlines(results, expected_endlines)
188