summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorJean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>2020-01-24 18:07:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:09 +0000
commit22dd46cc34629d0750177fddff2e1c178c854340 (patch)
tree3d0bed22da9aea6dcce31d0c592a39f80a786f4a /meta/lib
parent44b2ab8d5eb4fd1fc9a157fce37aaa7b7a7065e5 (diff)
downloadpoky-22dd46cc34629d0750177fddff2e1c178c854340.tar.gz
oeqa/selftest/devtool: add npm recipe build test
This commit adds a devtool build test for npm recipe: - devtool.DevtoolAddTests.test_devtool_add_npm (From OE-Core rev: af299817c2fe9fa504762c54bd0593f3163399fb) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 57e6662e4a..e2f91bcb6c 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -511,6 +511,26 @@ class DevtoolAddTests(DevtoolBase):
511 checkvars['SRC_URI'] = url.replace(testver, '${PV}') 511 checkvars['SRC_URI'] = url.replace(testver, '${PV}')
512 self._test_recipe_contents(recipefile, checkvars, []) 512 self._test_recipe_contents(recipefile, checkvars, [])
513 513
514 def test_devtool_add_npm(self):
515 pn = 'savoirfairelinux-node-server-example'
516 pv = '1.0.0'
517 url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=' + pv
518 # Test devtool add
519 self.track_for_cleanup(self.workspacedir)
520 self.add_command_to_tearDown('bitbake -c cleansstate %s' % pn)
521 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
522 result = runCmd('devtool add \'%s\'' % url)
523 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
524 self.assertExists(os.path.join(self.workspacedir, 'recipes', pn, '%s_%s.bb' % (pn, pv)), 'Recipe not created')
525 self.assertExists(os.path.join(self.workspacedir, 'recipes', pn, pn, 'npm-shrinkwrap.json'), 'Shrinkwrap not created')
526 # Test devtool status
527 result = runCmd('devtool status')
528 self.assertIn(pn, result.output)
529 # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
530 bitbake('%s -c cleansstate' % pn)
531 # Test devtool build
532 result = runCmd('devtool build %s' % pn)
533
514class DevtoolModifyTests(DevtoolBase): 534class DevtoolModifyTests(DevtoolBase):
515 535
516 def test_devtool_modify(self): 536 def test_devtool_modify(self):