summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index 83361814df..2eca1800de 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -676,6 +676,25 @@ class RecipetoolCreateTests(RecipetoolBase):
676 676
677 self._test_recipe_contents(recipefile, checkvars, inherits) 677 self._test_recipe_contents(recipefile, checkvars, inherits)
678 678
679 def test_recipetool_create_python3_pep517_mesonpy(self):
680 # This test require python 3.11 or above for the tomllib module or tomli module to be installed
681 needTomllib(self)
682
683 # Test creating python3 package from tarball (using mesonpy class)
684 temprecipe = os.path.join(self.tempdir, 'recipe')
685 os.makedirs(temprecipe)
686 pn = 'siphash24'
687 pv = '1.4'
688 recipefile = os.path.join(temprecipe, 'python3-%s_%s.bb' % (pn, pv))
689 srcuri = 'https://files.pythonhosted.org/packages/c2/32/b934a70592f314afcfa86c7f7e388804a8061be65b822e2aa07e573b6477/%s-%s.tar.gz' % (pn, pv)
690 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
691 self.assertTrue(os.path.isfile(recipefile))
692 checkvars = {}
693 checkvars['SRC_URI[sha256sum]'] = '7fd65e39b2a7c8c4ddc3a168a687f4610751b0ac2ebb518783c0cdfc30bec4a0'
694 inherits = ['python_mesonpy', 'pypi']
695
696 self._test_recipe_contents(recipefile, checkvars, inherits)
697
679 def test_recipetool_create_github_tarball(self): 698 def test_recipetool_create_github_tarball(self):
680 # Basic test to ensure github URL mangling doesn't apply to release tarballs. 699 # Basic test to ensure github URL mangling doesn't apply to release tarballs.
681 # Deliberately use an older release of Meson at present so we don't need a toml parser. 700 # Deliberately use an older release of Meson at present so we don't need a toml parser.