From d22ed015d8f38241acb783e1a468fb15d4317670 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 7 Oct 2020 19:21:50 +0100 Subject: 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. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/recipetool.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta/lib/oeqa/selftest/cases/recipetool.py') 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): self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_npm(self): + collections = get_bb_var('BBFILE_COLLECTIONS').split() + if "openembedded-layer" not in collections: + self.skipTest("Test needs meta-oe for nodejs") + temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) recipefile = os.path.join(temprecipe, 'savoirfairelinux-node-server-example_1.0.0.bb') -- cgit 1.2.3-korg