summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-31 19:28:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-01 23:11:37 +0100
commit13a1e484c3ea5a6463090cae86860e5afa08c999 (patch)
treecfd09007f8dc2e51f688c03b58914c59a5799299 /meta
parentc580bc6008f875d188315851b8391a72aebc89f4 (diff)
downloadpoky-13a1e484c3ea5a6463090cae86860e5afa08c999.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. (From OE-Core rev: b4d8aca97a1ead38ce55f3bb5859d3d05d9dd84f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 e910672c31..9c69585a88 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1471,6 +1471,14 @@ class DevtoolExtractTests(DevtoolBase):
1471 1471
1472class DevtoolUpgradeTests(DevtoolBase): 1472class DevtoolUpgradeTests(DevtoolBase):
1473 1473
1474 def setUp(self):
1475 super().setUp()
1476 try:
1477 runCmd("git config --global user.name")
1478 runCmd("git config --global user.email")
1479 except:
1480 self.skip("Git user.name and user.email must be set")
1481
1474 def test_devtool_upgrade(self): 1482 def test_devtool_upgrade(self):
1475 # Check preconditions 1483 # Check preconditions
1476 self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') 1484 self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')