summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-31 19:28:55 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2022-04-07 14:40:14 +0800
commit8874b5e602798a04643b06d981098f58fb4f7320 (patch)
tree9ce60ff6fdfc0eefed0e2d59e358658a10940142
parent76bd42e585a79f19f8cad6ffffd64d4c590a33b1 (diff)
downloadopenembedded-core-contrib-8874b5e602798a04643b06d981098f58fb4f7320.tar.gz
oeqa/selftest/devtool: ensure Git username is set before upgrade tests
The 'devtool upgrade' tests fail if Git doesn't know the user's name or email, so verify this before the tests start and skip if it is not. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit b4d8aca97a1ead38ce55f3bb5859d3d05d9dd84f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-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 a2b4d7f7d1..1fe0628a44 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1464,6 +1464,14 @@ class DevtoolExtractTests(DevtoolBase):
class DevtoolUpgradeTests(DevtoolBase):
+ def setUp(self):
+ super().setUp()
+ try:
+ runCmd("git config --global user.name")
+ runCmd("git config --global user.email")
+ except:
+ self.skip("Git user.name and user.email must be set")
+
def test_devtool_upgrade(self):
# Check preconditions
self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')