summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/recipetool.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-08 16:56:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-09 16:31:55 +0100
commitc7592b01478def091b6787412390c61e7ce0a0cd (patch)
tree3c2f26480c6e16fae0ad65b032e3dc0fccfca71b /meta/lib/oeqa/selftest/cases/recipetool.py
parentc0dc72bad92e2e4dc0aedb48b969709f821baf73 (diff)
downloadpoky-c7592b01478def091b6787412390c61e7ce0a0cd.tar.gz
oeqa: Drop OETestID
These IDs refer to testopia which we're no longer using. We would now use the test names to definitively reference tests and the IDs can be dropped, along with their supporting code. (From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/recipetool.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index 06f980e1b0..439d87f834 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -5,7 +5,6 @@ import urllib.parse
5 5
6from oeqa.utils.commands import runCmd, bitbake, get_bb_var 6from oeqa.utils.commands import runCmd, bitbake, get_bb_var
7from oeqa.utils.commands import get_bb_vars, create_temp_layer 7from oeqa.utils.commands import get_bb_vars, create_temp_layer
8from oeqa.core.decorator.oeid import OETestID
9from oeqa.selftest.cases import devtool 8from oeqa.selftest.cases import devtool
10 9
11templayerdir = None 10templayerdir = None
@@ -89,7 +88,6 @@ class RecipetoolTests(RecipetoolBase):
89 for errorstr in checkerror: 88 for errorstr in checkerror:
90 self.assertIn(errorstr, result.output) 89 self.assertIn(errorstr, result.output)
91 90
92 @OETestID(1177)
93 def test_recipetool_appendfile_basic(self): 91 def test_recipetool_appendfile_basic(self):
94 # Basic test 92 # Basic test
95 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 93 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -97,14 +95,12 @@ class RecipetoolTests(RecipetoolBase):
97 _, output = self._try_recipetool_appendfile('base-files', '/etc/motd', self.testfile, '', expectedlines, ['motd']) 95 _, output = self._try_recipetool_appendfile('base-files', '/etc/motd', self.testfile, '', expectedlines, ['motd'])
98 self.assertNotIn('WARNING: ', output) 96 self.assertNotIn('WARNING: ', output)
99 97
100 @OETestID(1183)
101 def test_recipetool_appendfile_invalid(self): 98 def test_recipetool_appendfile_invalid(self):
102 # Test some commands that should error 99 # Test some commands that should error
103 self._try_recipetool_appendfile_fail('/etc/passwd', self.testfile, ['ERROR: /etc/passwd cannot be handled by this tool', 'useradd', 'extrausers']) 100 self._try_recipetool_appendfile_fail('/etc/passwd', self.testfile, ['ERROR: /etc/passwd cannot be handled by this tool', 'useradd', 'extrausers'])
104 self._try_recipetool_appendfile_fail('/etc/timestamp', self.testfile, ['ERROR: /etc/timestamp cannot be handled by this tool']) 101 self._try_recipetool_appendfile_fail('/etc/timestamp', self.testfile, ['ERROR: /etc/timestamp cannot be handled by this tool'])
105 self._try_recipetool_appendfile_fail('/dev/console', self.testfile, ['ERROR: /dev/console cannot be handled by this tool']) 102 self._try_recipetool_appendfile_fail('/dev/console', self.testfile, ['ERROR: /dev/console cannot be handled by this tool'])
106 103
107 @OETestID(1176)
108 def test_recipetool_appendfile_alternatives(self): 104 def test_recipetool_appendfile_alternatives(self):
109 # Now try with a file we know should be an alternative 105 # Now try with a file we know should be an alternative
110 # (this is very much a fake example, but one we know is reliably an alternative) 106 # (this is very much a fake example, but one we know is reliably an alternative)
@@ -128,7 +124,6 @@ class RecipetoolTests(RecipetoolBase):
128 result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True) 124 result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True)
129 self.assertNotEqual(result.status, 0, 'New file should have been copied but was not %s' % result.output) 125 self.assertNotEqual(result.status, 0, 'New file should have been copied but was not %s' % result.output)
130 126
131 @OETestID(1178)
132 def test_recipetool_appendfile_binary(self): 127 def test_recipetool_appendfile_binary(self):
133 # Try appending a binary file 128 # Try appending a binary file
134 # /bin/ls can be a symlink to /usr/bin/ls 129 # /bin/ls can be a symlink to /usr/bin/ls
@@ -137,7 +132,6 @@ class RecipetoolTests(RecipetoolBase):
137 self.assertIn('WARNING: ', result.output) 132 self.assertIn('WARNING: ', result.output)
138 self.assertIn('is a binary', result.output) 133 self.assertIn('is a binary', result.output)
139 134
140 @OETestID(1173)
141 def test_recipetool_appendfile_add(self): 135 def test_recipetool_appendfile_add(self):
142 # Try arbitrary file add to a recipe 136 # Try arbitrary file add to a recipe
143 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 137 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -166,7 +160,6 @@ class RecipetoolTests(RecipetoolBase):
166 '}\n'] 160 '}\n']
167 self._try_recipetool_appendfile('netbase', '/usr/share/scriptname', testfile2, '-r netbase', expectedlines, ['testfile', testfile2name]) 161 self._try_recipetool_appendfile('netbase', '/usr/share/scriptname', testfile2, '-r netbase', expectedlines, ['testfile', testfile2name])
168 162
169 @OETestID(1174)
170 def test_recipetool_appendfile_add_bindir(self): 163 def test_recipetool_appendfile_add_bindir(self):
171 # Try arbitrary file add to a recipe, this time to a location such that should be installed as executable 164 # Try arbitrary file add to a recipe, this time to a location such that should be installed as executable
172 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 165 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -180,7 +173,6 @@ class RecipetoolTests(RecipetoolBase):
180 _, output = self._try_recipetool_appendfile('netbase', '/usr/bin/selftest-recipetool-testbin', self.testfile, '-r netbase', expectedlines, ['testfile']) 173 _, output = self._try_recipetool_appendfile('netbase', '/usr/bin/selftest-recipetool-testbin', self.testfile, '-r netbase', expectedlines, ['testfile'])
181 self.assertNotIn('WARNING: ', output) 174 self.assertNotIn('WARNING: ', output)
182 175
183 @OETestID(1175)
184 def test_recipetool_appendfile_add_machine(self): 176 def test_recipetool_appendfile_add_machine(self):
185 # Try arbitrary file add to a recipe, this time to a location such that should be installed as executable 177 # Try arbitrary file add to a recipe, this time to a location such that should be installed as executable
186 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 178 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -196,7 +188,6 @@ class RecipetoolTests(RecipetoolBase):
196 _, output = self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase -m mymachine', expectedlines, ['mymachine/testfile']) 188 _, output = self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase -m mymachine', expectedlines, ['mymachine/testfile'])
197 self.assertNotIn('WARNING: ', output) 189 self.assertNotIn('WARNING: ', output)
198 190
199 @OETestID(1184)
200 def test_recipetool_appendfile_orig(self): 191 def test_recipetool_appendfile_orig(self):
201 # A file that's in SRC_URI and in do_install with the same name 192 # A file that's in SRC_URI and in do_install with the same name
202 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 193 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -204,7 +195,6 @@ class RecipetoolTests(RecipetoolBase):
204 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-orig', self.testfile, '', expectedlines, ['selftest-replaceme-orig']) 195 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-orig', self.testfile, '', expectedlines, ['selftest-replaceme-orig'])
205 self.assertNotIn('WARNING: ', output) 196 self.assertNotIn('WARNING: ', output)
206 197
207 @OETestID(1191)
208 def test_recipetool_appendfile_todir(self): 198 def test_recipetool_appendfile_todir(self):
209 # A file that's in SRC_URI and in do_install with destination directory rather than file 199 # A file that's in SRC_URI and in do_install with destination directory rather than file
210 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 200 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -212,7 +202,6 @@ class RecipetoolTests(RecipetoolBase):
212 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-todir', self.testfile, '', expectedlines, ['selftest-replaceme-todir']) 202 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-todir', self.testfile, '', expectedlines, ['selftest-replaceme-todir'])
213 self.assertNotIn('WARNING: ', output) 203 self.assertNotIn('WARNING: ', output)
214 204
215 @OETestID(1187)
216 def test_recipetool_appendfile_renamed(self): 205 def test_recipetool_appendfile_renamed(self):
217 # A file that's in SRC_URI with a different name to the destination file 206 # A file that's in SRC_URI with a different name to the destination file
218 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 207 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -220,7 +209,6 @@ class RecipetoolTests(RecipetoolBase):
220 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-renamed', self.testfile, '', expectedlines, ['file1']) 209 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-renamed', self.testfile, '', expectedlines, ['file1'])
221 self.assertNotIn('WARNING: ', output) 210 self.assertNotIn('WARNING: ', output)
222 211
223 @OETestID(1190)
224 def test_recipetool_appendfile_subdir(self): 212 def test_recipetool_appendfile_subdir(self):
225 # A file that's in SRC_URI in a subdir 213 # A file that's in SRC_URI in a subdir
226 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 214 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -234,7 +222,6 @@ class RecipetoolTests(RecipetoolBase):
234 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile']) 222 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile'])
235 self.assertNotIn('WARNING: ', output) 223 self.assertNotIn('WARNING: ', output)
236 224
237 @OETestID(1189)
238 def test_recipetool_appendfile_src_glob(self): 225 def test_recipetool_appendfile_src_glob(self):
239 # A file that's in SRC_URI as a glob 226 # A file that's in SRC_URI as a glob
240 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 227 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -248,7 +235,6 @@ class RecipetoolTests(RecipetoolBase):
248 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-src-globfile', self.testfile, '', expectedlines, ['testfile']) 235 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-src-globfile', self.testfile, '', expectedlines, ['testfile'])
249 self.assertNotIn('WARNING: ', output) 236 self.assertNotIn('WARNING: ', output)
250 237
251 @OETestID(1181)
252 def test_recipetool_appendfile_inst_glob(self): 238 def test_recipetool_appendfile_inst_glob(self):
253 # A file that's in do_install as a glob 239 # A file that's in do_install as a glob
254 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 240 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -256,7 +242,6 @@ class RecipetoolTests(RecipetoolBase):
256 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-globfile']) 242 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-globfile'])
257 self.assertNotIn('WARNING: ', output) 243 self.assertNotIn('WARNING: ', output)
258 244
259 @OETestID(1182)
260 def test_recipetool_appendfile_inst_todir_glob(self): 245 def test_recipetool_appendfile_inst_todir_glob(self):
261 # A file that's in do_install as a glob with destination as a directory 246 # A file that's in do_install as a glob with destination as a directory
262 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 247 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -264,7 +249,6 @@ class RecipetoolTests(RecipetoolBase):
264 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-todir-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-todir-globfile']) 249 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-todir-globfile', self.testfile, '', expectedlines, ['selftest-replaceme-inst-todir-globfile'])
265 self.assertNotIn('WARNING: ', output) 250 self.assertNotIn('WARNING: ', output)
266 251
267 @OETestID(1185)
268 def test_recipetool_appendfile_patch(self): 252 def test_recipetool_appendfile_patch(self):
269 # A file that's added by a patch in SRC_URI 253 # A file that's added by a patch in SRC_URI
270 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 254 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -283,7 +267,6 @@ class RecipetoolTests(RecipetoolBase):
283 else: 267 else:
284 self.fail('Patch warning not found in output:\n%s' % output) 268 self.fail('Patch warning not found in output:\n%s' % output)
285 269
286 @OETestID(1188)
287 def test_recipetool_appendfile_script(self): 270 def test_recipetool_appendfile_script(self):
288 # Now, a file that's in SRC_URI but installed by a script (so no mention in do_install) 271 # Now, a file that's in SRC_URI but installed by a script (so no mention in do_install)
289 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 272 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -297,7 +280,6 @@ class RecipetoolTests(RecipetoolBase):
297 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-scripted', self.testfile, '', expectedlines, ['testfile']) 280 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-scripted', self.testfile, '', expectedlines, ['testfile'])
298 self.assertNotIn('WARNING: ', output) 281 self.assertNotIn('WARNING: ', output)
299 282
300 @OETestID(1180)
301 def test_recipetool_appendfile_inst_func(self): 283 def test_recipetool_appendfile_inst_func(self):
302 # A file that's installed from a function called by do_install 284 # A file that's installed from a function called by do_install
303 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n', 285 expectedlines = ['FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n',
@@ -305,7 +287,6 @@ class RecipetoolTests(RecipetoolBase):
305 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-func', self.testfile, '', expectedlines, ['selftest-replaceme-inst-func']) 287 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-inst-func', self.testfile, '', expectedlines, ['selftest-replaceme-inst-func'])
306 self.assertNotIn('WARNING: ', output) 288 self.assertNotIn('WARNING: ', output)
307 289
308 @OETestID(1186)
309 def test_recipetool_appendfile_postinstall(self): 290 def test_recipetool_appendfile_postinstall(self):
310 # A file that's created by a postinstall script (and explicitly mentioned in it) 291 # A file that's created by a postinstall script (and explicitly mentioned in it)
311 # First try without specifying recipe 292 # First try without specifying recipe
@@ -321,7 +302,6 @@ class RecipetoolTests(RecipetoolBase):
321 '}\n'] 302 '}\n']
322 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-postinst', self.testfile, '-r selftest-recipetool-appendfile', expectedlines, ['testfile']) 303 _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-postinst', self.testfile, '-r selftest-recipetool-appendfile', expectedlines, ['testfile'])
323 304
324 @OETestID(1179)
325 def test_recipetool_appendfile_extlayer(self): 305 def test_recipetool_appendfile_extlayer(self):
326 # Try creating a bbappend in a layer that's not in bblayers.conf and has a different structure 306 # Try creating a bbappend in a layer that's not in bblayers.conf and has a different structure
327 exttemplayerdir = os.path.join(self.tempdir, 'extlayer') 307 exttemplayerdir = os.path.join(self.tempdir, 'extlayer')
@@ -337,7 +317,6 @@ class RecipetoolTests(RecipetoolBase):
337 'metadata/recipes/recipes-test/selftest-recipetool-appendfile/selftest-recipetool-appendfile/selftest-replaceme-orig'] 317 'metadata/recipes/recipes-test/selftest-recipetool-appendfile/selftest-recipetool-appendfile/selftest-replaceme-orig']
338 self.assertEqual(sorted(createdfiles), sorted(expectedfiles)) 318 self.assertEqual(sorted(createdfiles), sorted(expectedfiles))
339 319
340 @OETestID(1192)
341 def test_recipetool_appendfile_wildcard(self): 320 def test_recipetool_appendfile_wildcard(self):
342 321
343 def try_appendfile_wc(options): 322 def try_appendfile_wc(options):
@@ -362,7 +341,6 @@ class RecipetoolTests(RecipetoolBase):
362 filename = try_appendfile_wc('-w') 341 filename = try_appendfile_wc('-w')
363 self.assertEqual(filename, recipefn.split('_')[0] + '_%.bbappend') 342 self.assertEqual(filename, recipefn.split('_')[0] + '_%.bbappend')
364 343
365 @OETestID(1193)
366 def test_recipetool_create(self): 344 def test_recipetool_create(self):
367 # Try adding a recipe 345 # Try adding a recipe
368 tempsrc = os.path.join(self.tempdir, 'srctree') 346 tempsrc = os.path.join(self.tempdir, 'srctree')
@@ -379,7 +357,6 @@ class RecipetoolTests(RecipetoolBase):
379 checkvars['SRC_URI[sha256sum]'] = '2e6a401cac9024db2288297e3be1a8ab60e7401ba8e91225218aaf4a27e82a07' 357 checkvars['SRC_URI[sha256sum]'] = '2e6a401cac9024db2288297e3be1a8ab60e7401ba8e91225218aaf4a27e82a07'
380 self._test_recipe_contents(recipefile, checkvars, []) 358 self._test_recipe_contents(recipefile, checkvars, [])
381 359
382 @OETestID(1194)
383 def test_recipetool_create_git(self): 360 def test_recipetool_create_git(self):
384 if 'x11' not in get_bb_var('DISTRO_FEATURES'): 361 if 'x11' not in get_bb_var('DISTRO_FEATURES'):
385 self.skipTest('Test requires x11 as distro feature') 362 self.skipTest('Test requires x11 as distro feature')
@@ -402,7 +379,6 @@ class RecipetoolTests(RecipetoolBase):
402 inherits = ['autotools', 'pkgconfig'] 379 inherits = ['autotools', 'pkgconfig']
403 self._test_recipe_contents(recipefile, checkvars, inherits) 380 self._test_recipe_contents(recipefile, checkvars, inherits)
404 381
405 @OETestID(1392)
406 def test_recipetool_create_simple(self): 382 def test_recipetool_create_simple(self):
407 # Try adding a recipe 383 # Try adding a recipe
408 temprecipe = os.path.join(self.tempdir, 'recipe') 384 temprecipe = os.path.join(self.tempdir, 'recipe')
@@ -425,7 +401,6 @@ class RecipetoolTests(RecipetoolBase):
425 inherits = ['autotools'] 401 inherits = ['autotools']
426 self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits) 402 self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits)
427 403
428 @OETestID(1418)
429 def test_recipetool_create_cmake(self): 404 def test_recipetool_create_cmake(self):
430 bitbake('-c packagedata gtk+') 405 bitbake('-c packagedata gtk+')
431 406
@@ -445,7 +420,6 @@ class RecipetoolTests(RecipetoolBase):
445 inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig'] 420 inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig']
446 self._test_recipe_contents(recipefile, checkvars, inherits) 421 self._test_recipe_contents(recipefile, checkvars, inherits)
447 422
448 @OETestID(1638)
449 def test_recipetool_create_github(self): 423 def test_recipetool_create_github(self):
450 # Basic test to see if github URL mangling works 424 # Basic test to see if github URL mangling works
451 temprecipe = os.path.join(self.tempdir, 'recipe') 425 temprecipe = os.path.join(self.tempdir, 'recipe')
@@ -460,7 +434,6 @@ class RecipetoolTests(RecipetoolBase):
460 inherits = ['setuptools'] 434 inherits = ['setuptools']
461 self._test_recipe_contents(recipefile, checkvars, inherits) 435 self._test_recipe_contents(recipefile, checkvars, inherits)
462 436
463 @OETestID(1639)
464 def test_recipetool_create_github_tarball(self): 437 def test_recipetool_create_github_tarball(self):
465 # Basic test to ensure github URL mangling doesn't apply to release tarballs 438 # Basic test to ensure github URL mangling doesn't apply to release tarballs
466 temprecipe = os.path.join(self.tempdir, 'recipe') 439 temprecipe = os.path.join(self.tempdir, 'recipe')
@@ -476,7 +449,6 @@ class RecipetoolTests(RecipetoolBase):
476 inherits = ['setuptools'] 449 inherits = ['setuptools']
477 self._test_recipe_contents(recipefile, checkvars, inherits) 450 self._test_recipe_contents(recipefile, checkvars, inherits)
478 451
479 @OETestID(1637)
480 def test_recipetool_create_git_http(self): 452 def test_recipetool_create_git_http(self):
481 # Basic test to check http git URL mangling works 453 # Basic test to check http git URL mangling works
482 temprecipe = os.path.join(self.tempdir, 'recipe') 454 temprecipe = os.path.join(self.tempdir, 'recipe')
@@ -504,7 +476,6 @@ class RecipetoolTests(RecipetoolBase):
504 shutil.copy(srcfile, dstfile) 476 shutil.copy(srcfile, dstfile)
505 self.track_for_cleanup(dstfile) 477 self.track_for_cleanup(dstfile)
506 478
507 @OETestID(1640)
508 def test_recipetool_load_plugin(self): 479 def test_recipetool_load_plugin(self):
509 """Test that recipetool loads only the first found plugin in BBPATH.""" 480 """Test that recipetool loads only the first found plugin in BBPATH."""
510 481
@@ -626,11 +597,9 @@ class RecipetoolAppendsrcBase(RecipetoolBase):
626 597
627class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): 598class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
628 599
629 @OETestID(1273)
630 def test_recipetool_appendsrcfile_basic(self): 600 def test_recipetool_appendsrcfile_basic(self):
631 self._test_appendsrcfile('base-files', 'a-file') 601 self._test_appendsrcfile('base-files', 'a-file')
632 602
633 @OETestID(1274)
634 def test_recipetool_appendsrcfile_basic_wildcard(self): 603 def test_recipetool_appendsrcfile_basic_wildcard(self):
635 testrecipe = 'base-files' 604 testrecipe = 'base-files'
636 self._test_appendsrcfile(testrecipe, 'a-file', options='-w') 605 self._test_appendsrcfile(testrecipe, 'a-file', options='-w')
@@ -638,15 +607,12 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
638 bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir) 607 bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir)
639 self.assertEqual(os.path.basename(bbappendfile), '%s_%%.bbappend' % testrecipe) 608 self.assertEqual(os.path.basename(bbappendfile), '%s_%%.bbappend' % testrecipe)
640 609
641 @OETestID(1281)
642 def test_recipetool_appendsrcfile_subdir_basic(self): 610 def test_recipetool_appendsrcfile_subdir_basic(self):
643 self._test_appendsrcfile('base-files', 'a-file', 'tmp') 611 self._test_appendsrcfile('base-files', 'a-file', 'tmp')
644 612
645 @OETestID(1282)
646 def test_recipetool_appendsrcfile_subdir_basic_dirdest(self): 613 def test_recipetool_appendsrcfile_subdir_basic_dirdest(self):
647 self._test_appendsrcfile('base-files', destdir='tmp') 614 self._test_appendsrcfile('base-files', destdir='tmp')
648 615
649 @OETestID(1280)
650 def test_recipetool_appendsrcfile_srcdir_basic(self): 616 def test_recipetool_appendsrcfile_srcdir_basic(self):
651 testrecipe = 'bash' 617 testrecipe = 'bash'
652 bb_vars = get_bb_vars(['S', 'WORKDIR'], testrecipe) 618 bb_vars = get_bb_vars(['S', 'WORKDIR'], testrecipe)
@@ -655,14 +621,12 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
655 subdir = os.path.relpath(srcdir, workdir) 621 subdir = os.path.relpath(srcdir, workdir)
656 self._test_appendsrcfile(testrecipe, 'a-file', srcdir=subdir) 622 self._test_appendsrcfile(testrecipe, 'a-file', srcdir=subdir)
657 623
658 @OETestID(1275)
659 def test_recipetool_appendsrcfile_existing_in_src_uri(self): 624 def test_recipetool_appendsrcfile_existing_in_src_uri(self):
660 testrecipe = 'base-files' 625 testrecipe = 'base-files'
661 filepath = self._get_first_file_uri(testrecipe) 626 filepath = self._get_first_file_uri(testrecipe)
662 self.assertTrue(filepath, 'Unable to test, no file:// uri found in SRC_URI for %s' % testrecipe) 627 self.assertTrue(filepath, 'Unable to test, no file:// uri found in SRC_URI for %s' % testrecipe)
663 self._test_appendsrcfile(testrecipe, filepath, has_src_uri=False) 628 self._test_appendsrcfile(testrecipe, filepath, has_src_uri=False)
664 629
665 @OETestID(1276)
666 def test_recipetool_appendsrcfile_existing_in_src_uri_diff_params(self): 630 def test_recipetool_appendsrcfile_existing_in_src_uri_diff_params(self):
667 testrecipe = 'base-files' 631 testrecipe = 'base-files'
668 subdir = 'tmp' 632 subdir = 'tmp'
@@ -672,7 +636,6 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
672 output = self._test_appendsrcfile(testrecipe, filepath, subdir, has_src_uri=False) 636 output = self._test_appendsrcfile(testrecipe, filepath, subdir, has_src_uri=False)
673 self.assertTrue(any('with different parameters' in l for l in output)) 637 self.assertTrue(any('with different parameters' in l for l in output))
674 638
675 @OETestID(1277)
676 def test_recipetool_appendsrcfile_replace_file_srcdir(self): 639 def test_recipetool_appendsrcfile_replace_file_srcdir(self):
677 testrecipe = 'bash' 640 testrecipe = 'bash'
678 filepath = 'Makefile.in' 641 filepath = 'Makefile.in'
@@ -685,7 +648,6 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
685 bitbake('%s:do_unpack' % testrecipe) 648 bitbake('%s:do_unpack' % testrecipe)
686 self.assertEqual(open(self.testfile, 'r').read(), open(os.path.join(srcdir, filepath), 'r').read()) 649 self.assertEqual(open(self.testfile, 'r').read(), open(os.path.join(srcdir, filepath), 'r').read())
687 650
688 @OETestID(1278)
689 def test_recipetool_appendsrcfiles_basic(self, destdir=None): 651 def test_recipetool_appendsrcfiles_basic(self, destdir=None):
690 newfiles = [self.testfile] 652 newfiles = [self.testfile]
691 for i in range(1, 5): 653 for i in range(1, 5):
@@ -695,6 +657,5 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase):
695 newfiles.append(testfile) 657 newfiles.append(testfile)
696 self._test_appendsrcfiles('gcc', newfiles, destdir=destdir, options='-W') 658 self._test_appendsrcfiles('gcc', newfiles, destdir=destdir, options='-W')
697 659
698 @OETestID(1279)
699 def test_recipetool_appendsrcfiles_basic_subdir(self): 660 def test_recipetool_appendsrcfiles_basic_subdir(self):
700 self.test_recipetool_appendsrcfiles_basic(destdir='testdir') 661 self.test_recipetool_appendsrcfiles_basic(destdir='testdir')