summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/devtool.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/devtool.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 19a205912b..b92f017b81 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -18,12 +18,11 @@ from oeqa.selftest.case import OESelftestTestCase
18from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer 18from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
19from oeqa.utils.commands import get_bb_vars, runqemu, runqemu_check_taps, get_test_layer 19from oeqa.utils.commands import get_bb_vars, runqemu, runqemu_check_taps, get_test_layer
20from oeqa.core.decorator import OETestTag 20from oeqa.core.decorator import OETestTag
21from bb.utils import mkdirhier, edit_bblayers_conf
21 22
22oldmetapath = None 23oldmetapath = None
23 24
24def setUpModule(): 25def setUpModule():
25 import bb.utils
26
27 global templayerdir 26 global templayerdir
28 templayerdir = tempfile.mkdtemp(prefix='devtoolqa') 27 templayerdir = tempfile.mkdtemp(prefix='devtoolqa')
29 corecopydir = os.path.join(templayerdir, 'core-copy') 28 corecopydir = os.path.join(templayerdir, 'core-copy')
@@ -79,12 +78,12 @@ def setUpModule():
79 shutil.copytree(pth, destdir, ignore=shutil.ignore_patterns('*.pyc', '__pycache__')) 78 shutil.copytree(pth, destdir, ignore=shutil.ignore_patterns('*.pyc', '__pycache__'))
80 else: 79 else:
81 destdir = os.path.join(corecopydir, os.path.dirname(relpth)) 80 destdir = os.path.join(corecopydir, os.path.dirname(relpth))
82 bb.utils.mkdirhier(destdir) 81 mkdirhier(destdir)
83 shutil.copy2(pth, destdir) 82 shutil.copy2(pth, destdir)
84 return newmetapath 83 return newmetapath
85 else: 84 else:
86 return layerpath 85 return layerpath
87 bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb) 86 edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb)
88 87
89def tearDownModule(): 88def tearDownModule():
90 if oldmetapath: 89 if oldmetapath:
@@ -96,7 +95,7 @@ def tearDownModule():
96 else: 95 else:
97 return layerpath 96 return layerpath
98 bblayers_conf = os.path.join(os.environ['BUILDDIR'], 'conf', 'bblayers.conf') 97 bblayers_conf = os.path.join(os.environ['BUILDDIR'], 'conf', 'bblayers.conf')
99 bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb) 98 edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb)
100 shutil.rmtree(templayerdir) 99 shutil.rmtree(templayerdir)
101 100
102class DevtoolTestCase(OESelftestTestCase): 101class DevtoolTestCase(OESelftestTestCase):
@@ -404,7 +403,7 @@ class DevtoolAddTests(DevtoolBase):
404 test_file_content = "TEST CONTENT" 403 test_file_content = "TEST CONTENT"
405 test_file_package_root = os.path.join(tempdir, pn) 404 test_file_package_root = os.path.join(tempdir, pn)
406 test_file_dir_full = os.path.join(test_file_package_root, test_file_dir) 405 test_file_dir_full = os.path.join(test_file_package_root, test_file_dir)
407 bb.utils.mkdirhier(test_file_dir_full) 406 mkdirhier(test_file_dir_full)
408 with open(os.path.join(test_file_dir_full, test_file_name), "w") as f: 407 with open(os.path.join(test_file_dir_full, test_file_name), "w") as f:
409 f.write(test_file_content) 408 f.write(test_file_content)
410 bin_package_path = os.path.join(tempdir, "%s.tar.gz" % pn) 409 bin_package_path = os.path.join(tempdir, "%s.tar.gz" % pn)