mirror of
https://git.yoctoproject.org/poky
synced 2026-04-17 18:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
44b2ab8d5e
commit
22dd46cc34
@@ -511,6 +511,26 @@ class DevtoolAddTests(DevtoolBase):
|
||||
checkvars['SRC_URI'] = url.replace(testver, '${PV}')
|
||||
self._test_recipe_contents(recipefile, checkvars, [])
|
||||
|
||||
def test_devtool_add_npm(self):
|
||||
pn = 'savoirfairelinux-node-server-example'
|
||||
pv = '1.0.0'
|
||||
url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=' + pv
|
||||
# Test devtool add
|
||||
self.track_for_cleanup(self.workspacedir)
|
||||
self.add_command_to_tearDown('bitbake -c cleansstate %s' % pn)
|
||||
self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
|
||||
result = runCmd('devtool add \'%s\'' % url)
|
||||
self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
|
||||
self.assertExists(os.path.join(self.workspacedir, 'recipes', pn, '%s_%s.bb' % (pn, pv)), 'Recipe not created')
|
||||
self.assertExists(os.path.join(self.workspacedir, 'recipes', pn, pn, 'npm-shrinkwrap.json'), 'Shrinkwrap not created')
|
||||
# Test devtool status
|
||||
result = runCmd('devtool status')
|
||||
self.assertIn(pn, result.output)
|
||||
# Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
|
||||
bitbake('%s -c cleansstate' % pn)
|
||||
# Test devtool build
|
||||
result = runCmd('devtool build %s' % pn)
|
||||
|
||||
class DevtoolModifyTests(DevtoolBase):
|
||||
|
||||
def test_devtool_modify(self):
|
||||
|
||||
Reference in New Issue
Block a user