summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/case.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/case.py')
-rw-r--r--meta/lib/oeqa/selftest/case.py36
1 files changed, 21 insertions, 15 deletions
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index 31a11fddda..871009c568 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -13,28 +13,34 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var
13from oeqa.core.case import OETestCase 13from oeqa.core.case import OETestCase
14 14
15class OESelftestTestCase(OETestCase): 15class OESelftestTestCase(OETestCase):
16 builddir = os.environ.get("BUILDDIR") or ""
17 localconf_path = os.path.join(builddir, "conf/local.conf")
18 localconf_backup = os.path.join(builddir, "conf/local.bk")
19 testinc_path = os.path.join(builddir, "conf/selftest.inc")
20 local_bblayers_path = os.path.join(builddir, "conf/bblayers.conf")
21 local_bblayers_backup = os.path.join(builddir, "conf/bblayers.bk")
22 testinc_bblayers_path = os.path.join(builddir, "conf/bblayers.inc")
23 machineinc_path = os.path.join(builddir, "conf/machine.inc")
24
25 def __init__(self, methodName="runTest"): 16 def __init__(self, methodName="runTest"):
26 self._extra_tear_down_commands = [] 17 self._extra_tear_down_commands = []
27 self._track_for_cleanup = [
28 self.testinc_path, self.testinc_bblayers_path,
29 self.machineinc_path, self.localconf_backup,
30 self.local_bblayers_backup]
31
32 super(OESelftestTestCase, self).__init__(methodName) 18 super(OESelftestTestCase, self).__init__(methodName)
33 19
34 @classmethod 20 @classmethod
35 def setUpClass(cls): 21 def setUpClass(cls):
36 super(OESelftestTestCase, cls).setUpClass() 22 super(OESelftestTestCase, cls).setUpClass()
37 cls.testlayer_path = cls.tc.testlayer_path 23
24 cls.testlayer_path = cls.tc.config_paths['testlayer_path']
25 cls.builddir = cls.tc.config_paths['builddir']
26
27 cls.localconf_path = cls.tc.config_paths['localconf']
28 cls.localconf_backup = cls.tc.config_paths['localconf_class_backup']
29 cls.local_bblayers_path = cls.tc.config_paths['bblayers']
30 cls.local_bblayers_backup = cls.tc.config_paths['bblayers_class_backup']
31
32 cls.testinc_path = os.path.join(cls.tc.config_paths['builddir'],
33 "conf/selftest.inc")
34 cls.testinc_bblayers_path = os.path.join(cls.tc.config_paths['builddir'],
35 "conf/bblayers.inc")
36 cls.machineinc_path = os.path.join(cls.tc.config_paths['builddir'],
37 "conf/machine.inc")
38
39 cls._track_for_cleanup = [
40 cls.testinc_path, cls.testinc_bblayers_path,
41 cls.machineinc_path, cls.localconf_backup,
42 cls.local_bblayers_backup]
43
38 cls.add_include() 44 cls.add_include()
39 45
40 @classmethod 46 @classmethod