diff options
| author | Tobias Pistora <pistora.tobias@gmail.com> | 2025-08-13 11:20:42 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-14 10:31:10 +0100 |
| commit | 921faf324658371193b1f0847ebc1912d7fef25d (patch) | |
| tree | d74696244e096e3fd38c61107dc64bc2694b3faf /meta | |
| parent | 4c7b0007327d592b8f5d1f50ebb0325dc483bd87 (diff) | |
| download | poky-921faf324658371193b1f0847ebc1912d7fef25d.tar.gz | |
selftest/devtool: add devtool upgrade selftest for recipes with git submodules
Tests [YOCTO #15943]
Move code from test_devtool_upgrade_git() into separate, local function.
Add a test_devtool_upgrade_gitsm() selftest for devtool.
Add recipes for testing gitsm components.
(From OE-Core rev: c996801af3a22f50955ed4e47220461d6d243a3b)
Signed-off-by: Tobias Pistora <pistora.tobias@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 580c567be3..19a205912b 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
| @@ -1958,13 +1958,11 @@ class DevtoolUpgradeTests(DevtoolBase): | |||
| 1958 | self.assertNotIn(recipe, result.output) | 1958 | self.assertNotIn(recipe, result.output) |
| 1959 | self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after resetting') | 1959 | self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after resetting') |
| 1960 | 1960 | ||
| 1961 | def test_devtool_upgrade_git(self): | 1961 | def _test_devtool_upgrade_git_by_recipe(self, recipe, commit): |
| 1962 | # Check preconditions | 1962 | # Check preconditions |
| 1963 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') | 1963 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') |
| 1964 | self.track_for_cleanup(self.workspacedir) | 1964 | self.track_for_cleanup(self.workspacedir) |
| 1965 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | 1965 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') |
| 1966 | recipe = 'devtool-upgrade-test2' | ||
| 1967 | commit = '6cc6077a36fe2648a5f993fe7c16c9632f946517' | ||
| 1968 | oldrecipefile = get_bb_var('FILE', recipe) | 1966 | oldrecipefile = get_bb_var('FILE', recipe) |
| 1969 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 1967 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
| 1970 | self.track_for_cleanup(tempdir) | 1968 | self.track_for_cleanup(tempdir) |
| @@ -1994,6 +1992,12 @@ class DevtoolUpgradeTests(DevtoolBase): | |||
| 1994 | self.assertNotIn(recipe, result.output) | 1992 | self.assertNotIn(recipe, result.output) |
| 1995 | self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after resetting') | 1993 | self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after resetting') |
| 1996 | 1994 | ||
| 1995 | def test_devtool_upgrade_git(self): | ||
| 1996 | self._test_devtool_upgrade_git_by_recipe('devtool-upgrade-test2', '6cc6077a36fe2648a5f993fe7c16c9632f946517') | ||
| 1997 | |||
| 1998 | def test_devtool_upgrade_gitsm(self): | ||
| 1999 | self._test_devtool_upgrade_git_by_recipe('devtool-upgrade-test5', 'a2885dd7d25380d23627e7544b7bbb55014b16ee') | ||
| 2000 | |||
| 1997 | def test_devtool_upgrade_drop_md5sum(self): | 2001 | def test_devtool_upgrade_drop_md5sum(self): |
| 1998 | # Check preconditions | 2002 | # Check preconditions |
| 1999 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') | 2003 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') |
