diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-05-26 09:54:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-06 19:02:43 +0100 |
commit | d09938a608fa3a97e1f91a21738b45062ef708c3 (patch) | |
tree | 17a085ecb5494175c92c54f6b59a724dc6dc6fc4 /meta | |
parent | 5633866ea57edf64f789c5aec4963aea9341db09 (diff) | |
download | poky-d09938a608fa3a97e1f91a21738b45062ef708c3.tar.gz |
oeqa/selftest/case: Don't figure out the testlayer inside
The test layer is added at init of selftest and is the same
across test runs so pass it as a attr in the context.
(From OE-Core rev: 8441da8fbc7ff2237d9ccd3a5c5117345f5c87b2)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/case.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py index 1e6754a160..31a11fddda 100644 --- a/meta/lib/oeqa/selftest/case.py +++ b/meta/lib/oeqa/selftest/case.py | |||
@@ -9,7 +9,7 @@ import errno | |||
9 | from unittest.util import safe_repr | 9 | from unittest.util import safe_repr |
10 | 10 | ||
11 | import oeqa.utils.ftools as ftools | 11 | import oeqa.utils.ftools as ftools |
12 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer | 12 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var |
13 | from oeqa.core.case import OETestCase | 13 | from oeqa.core.case import OETestCase |
14 | 14 | ||
15 | class OESelftestTestCase(OETestCase): | 15 | class OESelftestTestCase(OETestCase): |
@@ -21,7 +21,6 @@ class OESelftestTestCase(OETestCase): | |||
21 | local_bblayers_backup = os.path.join(builddir, "conf/bblayers.bk") | 21 | local_bblayers_backup = os.path.join(builddir, "conf/bblayers.bk") |
22 | testinc_bblayers_path = os.path.join(builddir, "conf/bblayers.inc") | 22 | testinc_bblayers_path = os.path.join(builddir, "conf/bblayers.inc") |
23 | machineinc_path = os.path.join(builddir, "conf/machine.inc") | 23 | machineinc_path = os.path.join(builddir, "conf/machine.inc") |
24 | testlayer_path = get_test_layer() | ||
25 | 24 | ||
26 | def __init__(self, methodName="runTest"): | 25 | def __init__(self, methodName="runTest"): |
27 | self._extra_tear_down_commands = [] | 26 | self._extra_tear_down_commands = [] |
@@ -35,6 +34,7 @@ class OESelftestTestCase(OETestCase): | |||
35 | @classmethod | 34 | @classmethod |
36 | def setUpClass(cls): | 35 | def setUpClass(cls): |
37 | super(OESelftestTestCase, cls).setUpClass() | 36 | super(OESelftestTestCase, cls).setUpClass() |
37 | cls.testlayer_path = cls.tc.testlayer_path | ||
38 | cls.add_include() | 38 | cls.add_include() |
39 | 39 | ||
40 | @classmethod | 40 | @classmethod |
@@ -75,7 +75,7 @@ class OESelftestTestCase(OETestCase): | |||
75 | def remove_inc_files(cls): | 75 | def remove_inc_files(cls): |
76 | try: | 76 | try: |
77 | os.remove(os.path.join(cls.builddir, "conf/selftest.inc")) | 77 | os.remove(os.path.join(cls.builddir, "conf/selftest.inc")) |
78 | for root, _, files in os.walk(get_test_layer()): | 78 | for root, _, files in os.walk(cls.testlayer_path): |
79 | for f in files: | 79 | for f in files: |
80 | if f == 'test_recipe.inc': | 80 | if f == 'test_recipe.inc': |
81 | os.remove(os.path.join(root, f)) | 81 | os.remove(os.path.join(root, f)) |