diff options
author | Adrian Freihofer <adrian.freihofer@siemens.com> | 2025-09-18 23:07:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-22 22:09:48 +0100 |
commit | 4311968c2ca121f01babb7df9e95474b275f3b3c (patch) | |
tree | 8fa593077993915f29d1294a53af2a91466b2a53 | |
parent | bb5609c65d00a889135dd5d8c3676201d3a9e3eb (diff) | |
download | poky-4311968c2ca121f01babb7df9e95474b275f3b3c.tar.gz |
oe-selftest: devtool: add missing imports
Cleanup some indirect imports. This does not solve a real problem, but
it fixes some issues with IDEs that do not properly resolve indirect
imports.
(From OE-Core rev: b1b460c8b1c8047d9fb08287036a0b4f5446b7cb)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 11 |
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 | |||
18 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer | 18 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer |
19 | from oeqa.utils.commands import get_bb_vars, runqemu, runqemu_check_taps, get_test_layer | 19 | from oeqa.utils.commands import get_bb_vars, runqemu, runqemu_check_taps, get_test_layer |
20 | from oeqa.core.decorator import OETestTag | 20 | from oeqa.core.decorator import OETestTag |
21 | from bb.utils import mkdirhier, edit_bblayers_conf | ||
21 | 22 | ||
22 | oldmetapath = None | 23 | oldmetapath = None |
23 | 24 | ||
24 | def setUpModule(): | 25 | def 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 | ||
89 | def tearDownModule(): | 88 | def 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 | ||
102 | class DevtoolTestCase(OESelftestTestCase): | 101 | class 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) |