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 e992dcf771..302ec5d42e 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):
@@ -114,6 +115,20 @@ class DevtoolBase(oeSelfTest):
114 115
115class DevtoolTests(DevtoolBase): 116class DevtoolTests(DevtoolBase):
116 117
118 @classmethod
119 def setUpClass(cls):
120 bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR'])
121 cls.original_sstate = bb_vars['SSTATE_DIR']
122 cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool')
123 cls.sstate_conf = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate
124 cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n'
125 % cls.original_sstate)
126
127 @classmethod
128 def tearDownClass(cls):
129 cls.log.debug('Deleting devtool sstate cache on %s' % cls.devtool_sstate)
130 runCmd('rm -rf %s' % cls.devtool_sstate)
131
117 def setUp(self): 132 def setUp(self):
118 """Test case setup function""" 133 """Test case setup function"""
119 super(DevtoolTests, self).setUp() 134 super(DevtoolTests, self).setUp()
@@ -121,6 +136,7 @@ class DevtoolTests(DevtoolBase):
121 self.assertTrue(not os.path.exists(self.workspacedir), 136 self.assertTrue(not os.path.exists(self.workspacedir),
122 'This test cannot be run with a workspace directory ' 137 'This test cannot be run with a workspace directory '
123 'under the build directory') 138 'under the build directory')
139 self.append_config(self.sstate_conf)
124 140
125 def _check_src_repo(self, repo_dir): 141 def _check_src_repo(self, repo_dir):
126 """Check srctree git repository""" 142 """Check srctree git repository"""