summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-11-04 14:42:51 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:37:18 +0000
commit0f146e77655d153d3f9a59e489265450f08c6ad7 (patch)
tree75dba2d2d2f3fdcc4850f4e7710f6b21d877826b /meta/lib/oeqa/selftest
parent0225888207f82e5f1d9e3dffb7c342a10169aea3 (diff)
downloadopenembedded-core-0f146e77655d153d3f9a59e489265450f08c6ad7.tar.gz
openembedded-core-0f146e77655d153d3f9a59e489265450f08c6ad7.tar.bz2
openembedded-core-0f146e77655d153d3f9a59e489265450f08c6ad7.zip
oeqa/selftest/layerappend: fix test if build directory is not inside COREBASE
Fix test_layer_appends to work when build directory is not inside COREBASE. Fixes [YOCTO #8639]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/layerappend.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/layerappend.py b/meta/lib/oeqa/selftest/layerappend.py
index a82a6c8b9d..4de5034a94 100644
--- a/meta/lib/oeqa/selftest/layerappend.py
+++ b/meta/lib/oeqa/selftest/layerappend.py
@@ -46,10 +46,11 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append += "file://appendtest.txt"
"""
- layerappend = "BBLAYERS += \"COREBASE/meta-layertest0 COREBASE/meta-layertest1 COREBASE/meta-layertest2\""
+ layerappend = ''
def tearDownLocal(self):
- ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
+ if self.layerappend:
+ ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
@testcase(1196)
def test_layer_appends(self):
@@ -79,7 +80,9 @@ SRC_URI_append += "file://appendtest.txt"
with open(layer + "/recipes-test/layerappendtest/appendtest.txt", "w") as f:
f.write("Layer 2 test")
self.track_for_cleanup(layer)
- ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
+
+ self.layerappend = "BBLAYERS += \"{0}/meta-layertest0 {0}/meta-layertest1 {0}/meta-layertest2\"".format(corebase)
+ ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
bitbake("layerappendtest")
data = ftools.read_file(stagingdir + "/appendtest.txt")
self.assertEqual(data, "Layer 2 test")