summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2024-02-21 20:36:59 +0100
committerSteve Sakoman <steve@sakoman.com>2024-03-01 05:19:53 -1000
commit49e5252272b5f6090f837c55dd58303935ca6d13 (patch)
treec45d3121710a4169167c95e2de1073e0bc0b5766 /meta/lib
parentc222adce8ea8664dd81548195594d36c8b61b1c9 (diff)
downloadpoky-49e5252272b5f6090f837c55dd58303935ca6d13.tar.gz
oeqa/selftest/recipetool: downgrade meson version to not use pyproject.toml
recipetool's pyproject.toml parsing needs tomllib (python 3.11+) or tomli (not a hard dependency), so is prone to failing depending on the host configuration. Downgrade the Meson release used for the checks to 0.52.1, which was the last release before moving to pyproject.toml. (From OE-Core rev: 24bf7bbd1fb21f84539b7a4263d76a33dbacacde) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib')
-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):