[oe-commits] [openembedded-core] branch master-next updated: oeqa/selftest/recipeutils: Fix parallel selftest failures
git at git.openembedded.org
git at git.openembedded.org
Thu Nov 29 17:10:51 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
The following commit(s) were added to refs/heads/master-next by this push:
new fb640fa oeqa/selftest/recipeutils: Fix parallel selftest failures
fb640fa is described below
commit fb640faa7f6c45328cb628c3765980c15e778a77
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Nov 29 17:07:52 2018 +0000
oeqa/selftest/recipeutils: Fix parallel selftest failures
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/selftest/cases/recipeutils.py | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py
index b7cb55b..d5cda52 100644
--- a/meta/lib/oeqa/selftest/cases/recipeutils.py
+++ b/meta/lib/oeqa/selftest/cases/recipeutils.py
@@ -22,12 +22,21 @@ def tearDownModule():
class RecipeUtilsTests(OESelftestTestCase):
""" Tests for the recipeutils module functions """
+ def get_selftest_layerdir(self, rd):
+ selftestdir = None
+ for entry in rd.getVar('BBLAYERS').split():
+ if "/meta-selftest" in entry:
+ selftestdir = entry
+ self.assertIsNotNone(selftestdir, msg="Couldn't find meta-selftest layer")
+ return selftestdir
+
+
def test_patch_recipe_varflag(self):
import oe.recipeutils
rd = tinfoil.parse_recipe('python3-async-test')
vals = {'SRC_URI[md5sum]': 'aaaaaa', 'LICENSE': 'something'}
- corebase = rd.getVar('COREBASE')
- patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=corebase)
+ selftestdir = os.path.dirname(self.get_selftest_layerdir(rd))
+ patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=selftestdir)
expected_patch = """
--- a/meta-selftest/recipes-devtools/python/python-async-test.inc
@@ -65,8 +74,8 @@ class RecipeUtilsTests(OESelftestTestCase):
del val[1]
val = ' '.join(val)
vals = {'SRC_URI': val}
- corebase = rd.getVar('COREBASE')
- patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=corebase)
+ selftestdir = os.path.dirname(self.get_selftest_layerdir(rd))
+ patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=selftestdir)
expected_patch = """
--- a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
@@ -91,8 +100,8 @@ class RecipeUtilsTests(OESelftestTestCase):
rd = tinfoil.parse_recipe('recipeutils-test')
val = rd.getVar('SRC_URI', False).split()
vals = {'SRC_URI': val[0]}
- corebase = rd.getVar('COREBASE')
- patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=corebase)
+ selftestdir = os.path.dirname(self.get_selftest_layerdir(rd))
+ patches = oe.recipeutils.patch_recipe(rd, rd.getVar('FILE'), vals, patch=True, relpath=selftestdir)
expected_patch = """
--- a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list