summaryrefslogtreecommitdiffstats
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>2016-01-12 08:42:27 +0000
commitcb0ca7264d5049c91bee1414e43509a1c9ef0714 (patch)
tree035ed71c9962ce029b2fd24f0d901c6ee2068ab0
parent8970ad60f5e6859a42a1999bed5c9b654c1fbbc0 (diff)
downloadpoky-cb0ca7264d5049c91bee1414e43509a1c9ef0714.tar.gz
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 master rev: 0f146e77655d153d3f9a59e489265450f08c6ad7) (From OE-Core rev: e353b303e271368426e71810bb75173ca6f53455) 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>
-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}:"
46 46
47SRC_URI_append += "file://appendtest.txt" 47SRC_URI_append += "file://appendtest.txt"
48""" 48"""
49 layerappend = "BBLAYERS += \"COREBASE/meta-layertest0 COREBASE/meta-layertest1 COREBASE/meta-layertest2\"" 49 layerappend = ''
50 50
51 def tearDownLocal(self): 51 def tearDownLocal(self):
52 ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/..")) 52 if self.layerappend:
53 ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
53 54
54 @testcase(1196) 55 @testcase(1196)
55 def test_layer_appends(self): 56 def test_layer_appends(self):
@@ -79,7 +80,9 @@ SRC_URI_append += "file://appendtest.txt"
79 with open(layer + "/recipes-test/layerappendtest/appendtest.txt", "w") as f: 80 with open(layer + "/recipes-test/layerappendtest/appendtest.txt", "w") as f:
80 f.write("Layer 2 test") 81 f.write("Layer 2 test")
81 self.track_for_cleanup(layer) 82 self.track_for_cleanup(layer)
82 ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/..")) 83
84 self.layerappend = "BBLAYERS += \"{0}/meta-layertest0 {0}/meta-layertest1 {0}/meta-layertest2\"".format(corebase)
85 ftools.append_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
83 bitbake("layerappendtest") 86 bitbake("layerappendtest")
84 data = ftools.read_file(stagingdir + "/appendtest.txt") 87 data = ftools.read_file(stagingdir + "/appendtest.txt")
85 self.assertEqual(data, "Layer 2 test") 88 self.assertEqual(data, "Layer 2 test")