summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index c1562c63b2..6bfe8f177f 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -421,6 +421,31 @@ class RecipetoolTests(RecipetoolBase):
421 inherits = ['cmake'] 421 inherits = ['cmake']
422 self._test_recipe_contents(recipefile, checkvars, inherits) 422 self._test_recipe_contents(recipefile, checkvars, inherits)
423 423
424 def test_recipetool_create_npm(self):
425 temprecipe = os.path.join(self.tempdir, 'recipe')
426 os.makedirs(temprecipe)
427 recipefile = os.path.join(temprecipe, 'savoirfairelinux-node-server-example_1.0.0.bb')
428 shrinkwrap = os.path.join(temprecipe, 'savoirfairelinux-node-server-example', 'npm-shrinkwrap.json')
429 srcuri = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0'
430 result = runCmd('recipetool create -o %s \'%s\'' % (temprecipe, srcuri))
431 self.assertTrue(os.path.isfile(recipefile))
432 self.assertTrue(os.path.isfile(shrinkwrap))
433 checkvars = {}
434 checkvars['SUMMARY'] = 'Node Server Example'
435 checkvars['HOMEPAGE'] = 'https://github.com/savoirfairelinux/node-server-example#readme'
436 checkvars['LICENSE'] = set(['MIT', 'ISC', 'Unknown'])
437 urls = []
438 urls.append('npm://registry.npmjs.org/;package=@savoirfairelinux/node-server-example;version=${PV}')
439 urls.append('npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json')
440 checkvars['SRC_URI'] = set(urls)
441 checkvars['S'] = '${WORKDIR}/npm'
442 checkvars['LICENSE_${PN}'] = 'MIT'
443 checkvars['LICENSE_${PN}-base64'] = 'Unknown'
444 checkvars['LICENSE_${PN}-accepts'] = 'MIT'
445 checkvars['LICENSE_${PN}-inherits'] = 'ISC'
446 inherits = ['npm']
447 self._test_recipe_contents(recipefile, checkvars, inherits)
448
424 def test_recipetool_create_github(self): 449 def test_recipetool_create_github(self):
425 # Basic test to see if github URL mangling works 450 # Basic test to see if github URL mangling works
426 temprecipe = os.path.join(self.tempdir, 'recipe') 451 temprecipe = os.path.join(self.tempdir, 'recipe')