summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/recipetool.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index d7d155f5ae..2cccf2b21b 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -442,6 +442,49 @@ class RecipetoolTests(RecipetoolBase):
442 inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig'] 442 inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig']
443 self._test_recipe_contents(recipefile, checkvars, inherits) 443 self._test_recipe_contents(recipefile, checkvars, inherits)
444 444
445 def test_recipetool_create_github(self):
446 # Basic test to see if github URL mangling works
447 temprecipe = os.path.join(self.tempdir, 'recipe')
448 os.makedirs(temprecipe)
449 recipefile = os.path.join(temprecipe, 'meson_git.bb')
450 srcuri = 'https://github.com/mesonbuild/meson'
451 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
452 self.assertTrue(os.path.isfile(recipefile))
453 checkvars = {}
454 checkvars['LICENSE'] = set(['Apache-2.0'])
455 checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https'
456 inherits = ['setuptools']
457 self._test_recipe_contents(recipefile, checkvars, inherits)
458
459 def test_recipetool_create_github_tarball(self):
460 # Basic test to ensure github URL mangling doesn't apply to release tarballs
461 temprecipe = os.path.join(self.tempdir, 'recipe')
462 os.makedirs(temprecipe)
463 pv = '0.32.0'
464 recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv)
465 srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv)
466 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
467 self.assertTrue(os.path.isfile(recipefile))
468 checkvars = {}
469 checkvars['LICENSE'] = set(['Apache-2.0'])
470 checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz'
471 inherits = ['setuptools']
472 self._test_recipe_contents(recipefile, checkvars, inherits)
473
474 def test_recipetool_create_git_http(self):
475 # Basic test to check http git URL mangling works
476 temprecipe = os.path.join(self.tempdir, 'recipe')
477 os.makedirs(temprecipe)
478 recipefile = os.path.join(temprecipe, 'matchbox-terminal_git.bb')
479 srcuri = 'http://git.yoctoproject.org/git/matchbox-terminal'
480 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
481 self.assertTrue(os.path.isfile(recipefile))
482 checkvars = {}
483 checkvars['LICENSE'] = set(['GPLv2'])
484 checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/matchbox-terminal;protocol=http'
485 inherits = ['pkgconfig', 'autotools']
486 self._test_recipe_contents(recipefile, checkvars, inherits)
487
445class RecipetoolAppendsrcBase(RecipetoolBase): 488class RecipetoolAppendsrcBase(RecipetoolBase):
446 def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles): 489 def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles):
447 cmd = 'recipetool appendsrcfile %s %s %s %s %s' % (options, self.templayerdir, testrecipe, newfile, destfile) 490 cmd = 'recipetool appendsrcfile %s %s %s %s %s' % (options, self.templayerdir, testrecipe, newfile, destfile)