diff options
author | Thomas Roos <throos@amazon.de> | 2023-05-19 14:09:58 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-06-23 04:16:41 -1000 |
commit | 49b2b70749b438dca47cc2bb49b84aa7369126e9 (patch) | |
tree | c3296b637e39906ff3cba8c1ea91652087674afe | |
parent | da8512f9b0a35931a23831bf678fa60b5d10aded (diff) | |
download | poky-49b2b70749b438dca47cc2bb49b84aa7369126e9.tar.gz |
oeqa/selftest/cases/devtool.py: skip all tests require folder a git repo
Devtool selftests require poky dir a git repo, when downloading poky as a tar,
this is not the case. Those tests will now skipped.
[YOCTO #12389]
(From OE-Core rev: 9ce30faa488ea905292b9944fb3c1b471019f28c)
Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 95a5bc130dc51ea9de95c64dbf0e9c7892415d50)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index f512ebc0a0..64179d4004 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
@@ -8,6 +8,7 @@ import shutil | |||
8 | import tempfile | 8 | import tempfile |
9 | import glob | 9 | import glob |
10 | import fnmatch | 10 | import fnmatch |
11 | import unittest | ||
11 | 12 | ||
12 | from oeqa.selftest.case import OESelftestTestCase | 13 | from oeqa.selftest.case import OESelftestTestCase |
13 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer | 14 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer |
@@ -38,6 +39,13 @@ def setUpModule(): | |||
38 | canonical_layerpath = os.path.realpath(canonical_layerpath) + '/' | 39 | canonical_layerpath = os.path.realpath(canonical_layerpath) + '/' |
39 | edited_layers.append(layerpath) | 40 | edited_layers.append(layerpath) |
40 | oldmetapath = os.path.realpath(layerpath) | 41 | oldmetapath = os.path.realpath(layerpath) |
42 | |||
43 | # when downloading poky from tar.gz some tests will be skipped (BUG 12389) | ||
44 | try: | ||
45 | runCmd('git rev-parse --is-inside-work-tree', cwd=canonical_layerpath) | ||
46 | except: | ||
47 | raise unittest.SkipTest("devtool tests require folder to be a git repo") | ||
48 | |||
41 | result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath) | 49 | result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath) |
42 | oldreporoot = result.output.rstrip() | 50 | oldreporoot = result.output.rstrip() |
43 | newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot)) | 51 | newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot)) |