summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorThomas Roos <throos@amazon.de>2023-05-19 14:09:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-25 10:29:09 +0100
commit5f08f9e0fccbbe7dc8c52ae03b329200a0eceeaa (patch)
tree089ae3d7441ab34789f9d0a8d63e773814c2b8a6 /meta/lib
parent541754ae37dc4bf434de387c052acd669efa4572 (diff)
downloadpoky-5f08f9e0fccbbe7dc8c52ae03b329200a0eceeaa.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: 95a5bc130dc51ea9de95c64dbf0e9c7892415d50) 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>
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 1896944250..397895c936 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))