diff options
author | Ross Burton <ross@burtonini.com> | 2022-03-31 19:28:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-09 08:27:05 +0100 |
commit | 03a4cea318e631dde6be8cf57937b454320a24cc (patch) | |
tree | 8813076ebba29582c6071388993c36fae07c30bd | |
parent | 5033d9640db227774d6df3c8908b0a1f5ef86226 (diff) | |
download | poky-03a4cea318e631dde6be8cf57937b454320a24cc.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: 8874b5e602798a04643b06d981098f58fb4f7320)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 8 |
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): | |||
1464 | 1464 | ||
1465 | class DevtoolUpgradeTests(DevtoolBase): | 1465 | class DevtoolUpgradeTests(DevtoolBase): |
1466 | 1466 | ||
1467 | def setUp(self): | ||
1468 | super().setUp() | ||
1469 | try: | ||
1470 | runCmd("git config --global user.name") | ||
1471 | runCmd("git config --global user.email") | ||
1472 | except: | ||
1473 | self.skip("Git user.name and user.email must be set") | ||
1474 | |||
1467 | def test_devtool_upgrade(self): | 1475 | def test_devtool_upgrade(self): |
1468 | # Check preconditions | 1476 | # Check preconditions |
1469 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') | 1477 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') |