oeqa/selftest/cases/devtool.py: skip all tests require folder a git repo
PATCH 1/1 oeqa/selftest/cases/devtool.py: skip all tests require folder a git repo
From: Thomas Roos <[email protected]>
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]
Signed-off-by Thomas Roos <[email protected]>
--- meta/lib/oeqa/selftest/cases/devtool.py | 8 ++++++++ 1 file changed, 8 insertions(+)
meta/lib/oeqa/selftest/cases/devtool.py +8 -0
@@ -10,6 +10,7 @@ import shutil import tempfile import glob import fnmatch +import unittest from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
@@ -40,6 +41,13 @@ def setUpModule(): canonical_layerpath = os.path.realpath(canonical_layerpath) + '/' edited_layers.append(layerpath) oldmetapath = os.path.realpath(layerpath) + + # when downloading poky from tar.gz some tests will be skipped (BUG 12389) + try: + runCmd('git rev-parse --is-inside-work-tree', cwd=canonical_layerpath) + except: + raise unittest.SkipTest("devtool tests require folder to be a git repo") + result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath) oldreporoot = result.output.rstrip() newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot))
Signature · 14 lines
2.34.1 Amazon Web Services EMEA SARL 38 avenue John F. Kennedy, L-1855 Luxembourg Sitz der Gesellschaft: L-1855 Luxemburg eingetragen im Luxemburgischen Handelsregister unter R.C.S. B186284 Amazon Web Services EMEA SARL, Niederlassung Deutschland Marcel-Breuer-Str. 12, D-80807 Muenchen Sitz der Zweigniederlassung: Muenchen eingetragen im Handelsregister des Amtsgerichts Muenchen unter HRB 242240, USt-ID DE317013094