summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/devtool.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/devtool.py')
-rw-r--r--meta/lib/oeqa/selftest/devtool.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 79a4b1fbaf..8bf9f05bb9 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -9,7 +9,8 @@ import fnmatch
9 9
10import oeqa.utils.ftools as ftools 10import oeqa.utils.ftools as ftools
11from oeqa.selftest.base import oeSelfTest 11from oeqa.selftest.base import oeSelfTest
12from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer, runqemu, get_test_layer 12from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
13from oeqa.utils.commands import get_bb_vars, runqemu, get_test_layer
13from oeqa.utils.decorators import testcase 14from oeqa.utils.decorators import testcase
14 15
15class DevtoolBase(oeSelfTest): 16class DevtoolBase(oeSelfTest):
@@ -117,6 +118,20 @@ class DevtoolBase(oeSelfTest):
117 118
118class DevtoolTests(DevtoolBase): 119class DevtoolTests(DevtoolBase):
119 120
121 @classmethod
122 def setUpClass(cls):
123 bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR'])
124 cls.original_sstate = bb_vars['SSTATE_DIR']
125 cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool')
126 cls.sstate_conf = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate
127 cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n'
128 % cls.original_sstate)
129
130 @classmethod
131 def tearDownClass(cls):
132 cls.log.debug('Deleting devtool sstate cache on %s' % cls.devtool_sstate)
133 runCmd('rm -rf %s' % cls.devtool_sstate)
134
120 def setUp(self): 135 def setUp(self):
121 """Test case setup function""" 136 """Test case setup function"""
122 super(DevtoolTests, self).setUp() 137 super(DevtoolTests, self).setUp()
@@ -124,6 +139,7 @@ class DevtoolTests(DevtoolBase):
124 self.assertTrue(not os.path.exists(self.workspacedir), 139 self.assertTrue(not os.path.exists(self.workspacedir),
125 'This test cannot be run with a workspace directory ' 140 'This test cannot be run with a workspace directory '
126 'under the build directory') 141 'under the build directory')
142 self.append_config(self.sstate_conf)
127 143
128 def _check_src_repo(self, repo_dir): 144 def _check_src_repo(self, repo_dir):
129 """Check srctree git repository""" 145 """Check srctree git repository"""