diff options
author | Ross Burton <ross@burtonini.com> | 2020-10-07 19:21:50 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-08 08:08:32 +0100 |
commit | 961de02fd14bcd201a07a69eb3287be76084a5a2 (patch) | |
tree | 58dc5f55e531766a766d36774d91bf25027b8012 | |
parent | 197cec77f5bebe3ba73e8ea878f7f7df528de4f1 (diff) | |
download | poky-961de02fd14bcd201a07a69eb3287be76084a5a2.tar.gz |
selftest: skip npm tests if nodejs-native isn't available
The tests are actually skipped if meta-oe isn't present which isn't
quite the same thing, but hopefully close enough.
(From OE-Core rev: d22ed015d8f38241acb783e1a468fb15d4317670)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 4a791ff40e..2c9ff7a95a 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
@@ -520,6 +520,10 @@ class DevtoolAddTests(DevtoolBase): | |||
520 | self._test_recipe_contents(recipefile, checkvars, []) | 520 | self._test_recipe_contents(recipefile, checkvars, []) |
521 | 521 | ||
522 | def test_devtool_add_npm(self): | 522 | def test_devtool_add_npm(self): |
523 | collections = get_bb_var('BBFILE_COLLECTIONS').split() | ||
524 | if "openembedded-layer" not in collections: | ||
525 | self.skipTest("Test needs meta-oe for nodejs") | ||
526 | |||
523 | pn = 'savoirfairelinux-node-server-example' | 527 | pn = 'savoirfairelinux-node-server-example' |
524 | pv = '1.0.0' | 528 | pv = '1.0.0' |
525 | url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=' + pv | 529 | url = 'npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=' + pv |
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 6bac53cf3d..9d56e9e1e3 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -409,6 +409,10 @@ class RecipetoolTests(RecipetoolBase): | |||
409 | self._test_recipe_contents(recipefile, checkvars, inherits) | 409 | self._test_recipe_contents(recipefile, checkvars, inherits) |
410 | 410 | ||
411 | def test_recipetool_create_npm(self): | 411 | def test_recipetool_create_npm(self): |
412 | collections = get_bb_var('BBFILE_COLLECTIONS').split() | ||
413 | if "openembedded-layer" not in collections: | ||
414 | self.skipTest("Test needs meta-oe for nodejs") | ||
415 | |||
412 | temprecipe = os.path.join(self.tempdir, 'recipe') | 416 | temprecipe = os.path.join(self.tempdir, 'recipe') |
413 | os.makedirs(temprecipe) | 417 | os.makedirs(temprecipe) |
414 | recipefile = os.path.join(temprecipe, 'savoirfairelinux-node-server-example_1.0.0.bb') | 418 | recipefile = os.path.join(temprecipe, 'savoirfairelinux-node-server-example_1.0.0.bb') |