summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/recipetool.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/recipetool.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py42
1 files changed, 40 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index f1cb37b53f..e3f5c71666 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -435,7 +435,45 @@ class RecipetoolTests(RecipetoolBase):
435 checkvars = {} 435 checkvars = {}
436 checkvars['LICENSE'] = set(['Apache-2.0']) 436 checkvars['LICENSE'] = set(['Apache-2.0'])
437 checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https' 437 checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https'
438 inherits = ['setuptools'] 438 inherits = ['setuptools3']
439 self._test_recipe_contents(recipefile, checkvars, inherits)
440
441 def test_recipetool_create_python3_setuptools(self):
442 # Test creating python3 package from tarball (using setuptools3 class)
443 temprecipe = os.path.join(self.tempdir, 'recipe')
444 os.makedirs(temprecipe)
445 pn = 'python-magic'
446 pv = '0.4.15'
447 recipefile = os.path.join(temprecipe, '%s_%s.bb' % (pn, pv))
448 srcuri = 'https://files.pythonhosted.org/packages/84/30/80932401906eaf787f2e9bd86dc458f1d2e75b064b4c187341f29516945c/python-magic-%s.tar.gz' % pv
449 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
450 self.assertTrue(os.path.isfile(recipefile))
451 checkvars = {}
452 checkvars['LICENSE'] = set(['MIT'])
453 checkvars['LIC_FILES_CHKSUM'] = 'file://LICENSE;md5=16a934f165e8c3245f241e77d401bb88'
454 checkvars['SRC_URI'] = 'https://files.pythonhosted.org/packages/84/30/80932401906eaf787f2e9bd86dc458f1d2e75b064b4c187341f29516945c/python-magic-${PV}.tar.gz'
455 checkvars['SRC_URI[md5sum]'] = 'e384c95a47218f66c6501cd6dd45ff59'
456 checkvars['SRC_URI[sha256sum]'] = 'f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5'
457 inherits = ['setuptools3']
458 self._test_recipe_contents(recipefile, checkvars, inherits)
459
460 def test_recipetool_create_python3_distutils(self):
461 # Test creating python3 package from tarball (using distutils3 class)
462 temprecipe = os.path.join(self.tempdir, 'recipe')
463 os.makedirs(temprecipe)
464 pn = 'docutils'
465 pv = '0.14'
466 recipefile = os.path.join(temprecipe, '%s_%s.bb' % (pn, pv))
467 srcuri = 'https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-%s.tar.gz' % pv
468 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
469 self.assertTrue(os.path.isfile(recipefile))
470 checkvars = {}
471 checkvars['LICENSE'] = set(['PSF', '&', 'BSD', 'GPL'])
472 checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING.txt;md5=35a23d42b615470583563132872c97d6'
473 checkvars['SRC_URI'] = 'https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-${PV}.tar.gz'
474 checkvars['SRC_URI[md5sum]'] = 'c53768d63db3873b7d452833553469de'
475 checkvars['SRC_URI[sha256sum]'] = '51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274'
476 inherits = ['distutils3']
439 self._test_recipe_contents(recipefile, checkvars, inherits) 477 self._test_recipe_contents(recipefile, checkvars, inherits)
440 478
441 def test_recipetool_create_github_tarball(self): 479 def test_recipetool_create_github_tarball(self):
@@ -450,7 +488,7 @@ class RecipetoolTests(RecipetoolBase):
450 checkvars = {} 488 checkvars = {}
451 checkvars['LICENSE'] = set(['Apache-2.0']) 489 checkvars['LICENSE'] = set(['Apache-2.0'])
452 checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' 490 checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz'
453 inherits = ['setuptools'] 491 inherits = ['setuptools3']
454 self._test_recipe_contents(recipefile, checkvars, inherits) 492 self._test_recipe_contents(recipefile, checkvars, inherits)
455 493
456 def test_recipetool_create_git_http(self): 494 def test_recipetool_create_git_http(self):