summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorThomas Roos <throos@amazon.de>2023-05-19 14:09:58 +0200
committerSteve Sakoman <steve@sakoman.com>2023-06-14 04:14:25 -1000
commitc99e034431ec5afcd52f53aa18a72c114a26509d (patch)
treea740d94230c0aee5e8a9bce95cbabf152e2b3097 /meta/lib
parent58926aee88844c69403d64b2bc6976d579f685f1 (diff)
downloadpoky-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.py8
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
10import tempfile 10import tempfile
11import glob 11import glob
12import fnmatch 12import fnmatch
13import unittest
13 14
14from oeqa.selftest.case import OESelftestTestCase 15from oeqa.selftest.case import OESelftestTestCase
15from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer 16from 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))