diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 20 |
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 | |||
| 514 | class DevtoolModifyTests(DevtoolBase): | 534 | class DevtoolModifyTests(DevtoolBase): |
| 515 | 535 | ||
| 516 | def test_devtool_modify(self): | 536 | def test_devtool_modify(self): |
