aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2020-10-07 19:21:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-08 08:08:28 +0100
commitd22ed015d8f38241acb783e1a468fb15d4317670 (patch)
tree2a727efe61bf1bec7bde9a714c6569aba3084cdf
parent9676ee24d190b144cb50be6ebde3990644a6df2a (diff)
downloadopenembedded-core-contrib-d22ed015d8f38241acb783e1a468fb15d4317670.tar.gz
openembedded-core-contrib-d22ed015d8f38241acb783e1a468fb15d4317670.tar.bz2
openembedded-core-contrib-d22ed015d8f38241acb783e1a468fb15d4317670.zip
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 <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py4
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py4
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 4a791ff40e0..2c9ff7a95a7 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -520,6 +520,10 @@ class DevtoolAddTests(DevtoolBase):
self._test_recipe_contents(recipefile, checkvars, [])
def test_devtool_add_npm(self):
+ collections = get_bb_var('BBFILE_COLLECTIONS').split()
+ if "openembedded-layer" not in collections:
+ self.skipTest("Test needs meta-oe for nodejs")
+
pn = 'savoirfairelinux-node-server-example'
pv = '1.0.0'
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 6bac53cf3da..9d56e9e1e32 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')