aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-05-26 09:54:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-03 23:47:46 +0100
commit96391c320dfa106858d3d0c00592bbaf34f73a54 (patch)
tree2b54039ed1b4db5653069a835f6acdb8c53be04c
parentade34b8af5aab3eb0d68545def636f08bac0c46b (diff)
downloadopenembedded-core-96391c320dfa106858d3d0c00592bbaf34f73a54.zip
openembedded-core-96391c320dfa106858d3d0c00592bbaf34f73a54.tar.gz
openembedded-core-96391c320dfa106858d3d0c00592bbaf34f73a54.tar.bz2
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. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-rw-r--r--meta/lib/oeqa/selftest/case.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index 1e6754a..31a11fd 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -9,7 +9,7 @@ import errno
from unittest.util import safe_repr
import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
from oeqa.core.case import OETestCase
class OESelftestTestCase(OETestCase):
@@ -21,7 +21,6 @@ class OESelftestTestCase(OETestCase):
local_bblayers_backup = os.path.join(builddir, "conf/bblayers.bk")
testinc_bblayers_path = os.path.join(builddir, "conf/bblayers.inc")
machineinc_path = os.path.join(builddir, "conf/machine.inc")
- testlayer_path = get_test_layer()
def __init__(self, methodName="runTest"):
self._extra_tear_down_commands = []
@@ -35,6 +34,7 @@ class OESelftestTestCase(OETestCase):
@classmethod
def setUpClass(cls):
super(OESelftestTestCase, cls).setUpClass()
+ cls.testlayer_path = cls.tc.testlayer_path
cls.add_include()
@classmethod
@@ -75,7 +75,7 @@ class OESelftestTestCase(OETestCase):
def remove_inc_files(cls):
try:
os.remove(os.path.join(cls.builddir, "conf/selftest.inc"))
- for root, _, files in os.walk(get_test_layer()):
+ for root, _, files in os.walk(cls.testlayer_path):
for f in files:
if f == 'test_recipe.inc':
os.remove(os.path.join(root, f))