diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2015-04-09 15:10:57 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-10 18:10:24 +0100 |
commit | c0fc3c4727a69455d899b52ee9d0ebd341a7912d (patch) | |
tree | 108d1c242e5ee069d3d98a5b194bfbce533c9801 | |
parent | f23a3b6212048c256a50784a1a7f482622e4c67d (diff) | |
download | poky-c0fc3c4727a69455d899b52ee9d0ebd341a7912d.tar.gz |
lib/oeqa/selftest/bblayers: improve test for add-layer and remove-layer
Use absolute path instead of relative path for meta-skeleton.
Otherwise the case would fail if the builddir outside the poky source
tree.
(From OE-Core rev: 90edaf9b9e51a24bf67c1c95732fc2d8cb22b098)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/bblayers.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/bblayers.py b/meta/lib/oeqa/selftest/bblayers.py index 5b046d06e1..3a18029a02 100644 --- a/meta/lib/oeqa/selftest/bblayers.py +++ b/meta/lib/oeqa/selftest/bblayers.py | |||
@@ -6,7 +6,7 @@ import shutil | |||
6 | 6 | ||
7 | import oeqa.utils.ftools as ftools | 7 | import oeqa.utils.ftools as ftools |
8 | from oeqa.selftest.base import oeSelfTest | 8 | from oeqa.selftest.base import oeSelfTest |
9 | from oeqa.utils.commands import runCmd | 9 | from oeqa.utils.commands import runCmd, get_bb_var |
10 | from oeqa.utils.decorators import testcase | 10 | from oeqa.utils.decorators import testcase |
11 | 11 | ||
12 | class BitbakeLayers(oeSelfTest): | 12 | class BitbakeLayers(oeSelfTest): |
@@ -44,15 +44,16 @@ class BitbakeLayers(oeSelfTest): | |||
44 | self.assertTrue(find_in_contents) | 44 | self.assertTrue(find_in_contents) |
45 | 45 | ||
46 | def test_bitbakelayers_add_remove(self): | 46 | def test_bitbakelayers_add_remove(self): |
47 | test_layer = os.path.join(get_bb_var('COREBASE'), 'meta-skeleton') | ||
47 | result = runCmd('bitbake-layers show-layers') | 48 | result = runCmd('bitbake-layers show-layers') |
48 | self.assertNotIn('meta-skeleton', result.output, 'This test cannot run with meta-skeleton in bblayers.conf') | 49 | self.assertNotIn('meta-skeleton', result.output, 'This test cannot run with meta-skeleton in bblayers.conf') |
49 | result = runCmd('bitbake-layers add-layer ../meta-skeleton') | 50 | result = runCmd('bitbake-layers add-layer %s' % test_layer) |
50 | result = runCmd('bitbake-layers show-layers') | 51 | result = runCmd('bitbake-layers show-layers') |
51 | self.assertIn('meta-skeleton', result.output) | 52 | self.assertIn('meta-skeleton', result.output) |
52 | result = runCmd('bitbake-layers remove-layer ../meta-skeleton') | 53 | result = runCmd('bitbake-layers remove-layer %s' % test_layer) |
53 | result = runCmd('bitbake-layers show-layers') | 54 | result = runCmd('bitbake-layers show-layers') |
54 | self.assertNotIn('meta-skeleton', result.output) | 55 | self.assertNotIn('meta-skeleton', result.output) |
55 | result = runCmd('bitbake-layers add-layer ../meta-skeleton') | 56 | result = runCmd('bitbake-layers add-layer %s' % test_layer) |
56 | result = runCmd('bitbake-layers show-layers') | 57 | result = runCmd('bitbake-layers show-layers') |
57 | self.assertIn('meta-skeleton', result.output) | 58 | self.assertIn('meta-skeleton', result.output) |
58 | result = runCmd('bitbake-layers remove-layer */meta-skeleton') | 59 | result = runCmd('bitbake-layers remove-layer */meta-skeleton') |