diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-11-04 14:42:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-11-16 11:39:39 +0000 |
commit | 480bbaee580e036ba59940d39cc770c13990f3b6 (patch) | |
tree | 6cd40aab4af688987f9885c9d6ddd0807970a1fd /meta/lib/oeqa/selftest/layerappend.py | |
parent | a301f6e3b840e3b748fff5ccb68c645e87013105 (diff) | |
download | poky-480bbaee580e036ba59940d39cc770c13990f3b6.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 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>
Diffstat (limited to 'meta/lib/oeqa/selftest/layerappend.py')
-rw-r--r-- | meta/lib/oeqa/selftest/layerappend.py | 9 |
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 | ||
47 | SRC_URI_append += "file://appendtest.txt" | 47 | SRC_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") |