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]. (From OE-Core rev: 0f146e77655d153d3f9a59e489265450f08c6ad7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
a301f6e3b8
commit
480bbaee58
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue