summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index db21325155..c888770533 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -440,17 +440,19 @@ class RecipetoolCreateTests(RecipetoolBase):
440 self._test_recipe_contents(recipefile, checkvars, inherits) 440 self._test_recipe_contents(recipefile, checkvars, inherits)
441 441
442 def test_recipetool_create_github(self): 442 def test_recipetool_create_github(self):
443 # Basic test to see if github URL mangling works 443 # Basic test to see if github URL mangling works. Deliberately use an
444 # older release of Meson at present so we don't need a toml parser.
444 temprecipe = os.path.join(self.tempdir, 'recipe') 445 temprecipe = os.path.join(self.tempdir, 'recipe')
445 os.makedirs(temprecipe) 446 os.makedirs(temprecipe)
446 recipefile = os.path.join(temprecipe, 'meson_git.bb') 447 recipefile = os.path.join(temprecipe, 'python3-meson_git.bb')
447 srcuri = 'https://github.com/mesonbuild/meson;rev=1.3.1' 448 srcuri = 'https://github.com/mesonbuild/meson;rev=0.52.1'
448 result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri]) 449 cmd = ['recipetool', 'create', '-o', temprecipe, srcuri]
449 self.assertTrue(os.path.isfile(recipefile)) 450 result = runCmd(cmd)
451 self.assertTrue(os.path.isfile(recipefile), msg="recipe %s not created for command %s, output %s" % (recipefile, " ".join(cmd), result.output))
450 checkvars = {} 452 checkvars = {}
451 checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) 453 checkvars['LICENSE'] = set(['Apache-2.0', "Unknown"])
452 checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=1.3' 454 checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=0.52'
453 inherits = ['python_setuptools_build_meta'] 455 inherits = ['setuptools3']
454 self._test_recipe_contents(recipefile, checkvars, inherits) 456 self._test_recipe_contents(recipefile, checkvars, inherits)
455 457
456 def test_recipetool_create_python3_setuptools(self): 458 def test_recipetool_create_python3_setuptools(self):
@@ -473,18 +475,19 @@ class RecipetoolCreateTests(RecipetoolBase):
473 self._test_recipe_contents(recipefile, checkvars, inherits) 475 self._test_recipe_contents(recipefile, checkvars, inherits)
474 476
475 def test_recipetool_create_github_tarball(self): 477 def test_recipetool_create_github_tarball(self):
476 # Basic test to ensure github URL mangling doesn't apply to release tarballs 478 # Basic test to ensure github URL mangling doesn't apply to release tarballs.
479 # Deliberately use an older release of Meson at present so we don't need a toml parser.
477 temprecipe = os.path.join(self.tempdir, 'recipe') 480 temprecipe = os.path.join(self.tempdir, 'recipe')
478 os.makedirs(temprecipe) 481 os.makedirs(temprecipe)
479 pv = '1.3.1' 482 pv = '0.52.1'
480 recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) 483 recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv)
481 srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) 484 srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv)
482 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) 485 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
483 self.assertTrue(os.path.isfile(recipefile)) 486 self.assertTrue(os.path.isfile(recipefile))
484 checkvars = {} 487 checkvars = {}
485 checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) 488 checkvars['LICENSE'] = set(['Apache-2.0'])
486 checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' 489 checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz'
487 inherits = ['python_setuptools_build_meta'] 490 inherits = ['setuptools3']
488 self._test_recipe_contents(recipefile, checkvars, inherits) 491 self._test_recipe_contents(recipefile, checkvars, inherits)
489 492
490 def _test_recipetool_create_git(self, srcuri, branch=None): 493 def _test_recipetool_create_git(self, srcuri, branch=None):