diff options
| author | Thomas Roos <throos@amazon.de> | 2023-05-19 14:09:58 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-06-14 04:14:25 -1000 |
| commit | c99e034431ec5afcd52f53aa18a72c114a26509d (patch) | |
| tree | a740d94230c0aee5e8a9bce95cbabf152e2b3097 /meta/lib | |
| parent | 58926aee88844c69403d64b2bc6976d579f685f1 (diff) | |
| download | poky-c99e034431ec5afcd52f53aa18a72c114a26509d.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: 5b913494b472ef03435cabf984361b43c3d813f4)
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>
Diffstat (limited to 'meta/lib')
| -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 94873fd19f..f51de8efe0 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
| @@ -10,6 +10,7 @@ import shutil | |||
| 10 | import tempfile | 10 | import tempfile |
| 11 | import glob | 11 | import glob |
| 12 | import fnmatch | 12 | import fnmatch |
| 13 | import unittest | ||
| 13 | 14 | ||
| 14 | from oeqa.selftest.case import OESelftestTestCase | 15 | from oeqa.selftest.case import OESelftestTestCase |
| 15 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer | 16 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer |
| @@ -40,6 +41,13 @@ def setUpModule(): | |||
| 40 | canonical_layerpath = os.path.realpath(canonical_layerpath) + '/' | 41 | canonical_layerpath = os.path.realpath(canonical_layerpath) + '/' |
| 41 | edited_layers.append(layerpath) | 42 | edited_layers.append(layerpath) |
| 42 | oldmetapath = os.path.realpath(layerpath) | 43 | oldmetapath = os.path.realpath(layerpath) |
| 44 | |||
| 45 | # when downloading poky from tar.gz some tests will be skipped (BUG 12389) | ||
| 46 | try: | ||
| 47 | runCmd('git rev-parse --is-inside-work-tree', cwd=canonical_layerpath) | ||
| 48 | except: | ||
| 49 | raise unittest.SkipTest("devtool tests require folder to be a git repo") | ||
| 50 | |||
| 43 | result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath) | 51 | result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath) |
| 44 | oldreporoot = result.output.rstrip() | 52 | oldreporoot = result.output.rstrip() |
| 45 | newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot)) | 53 | newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot)) |
