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-selftest | |
| 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-selftest')
| -rw-r--r-- | meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb | 32 | ||||
| -rw-r--r-- | meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb.upgraded | 31 |
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb new file mode 100644 index 0000000000..7e8b001a28 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | SUMMARY = "Test recipe for fetching git submodules" | ||
| 2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/" | ||
| 3 | LICENSE = "MIT" | ||
| 4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
| 5 | |||
| 6 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 7 | |||
| 8 | # Note: this is intentionally not the latest version in the original .bb | ||
| 9 | SRCREV = "132fea6e4dee56b61bcf5721c94e8b2445c6a017" | ||
| 10 | PV = "0.1+git" | ||
| 11 | PR = "r2" | ||
| 12 | |||
| 13 | SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master" | ||
| 14 | UPSTREAM_CHECK_COMMITS = "1" | ||
| 15 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | ||
| 16 | |||
| 17 | EXCLUDE_FROM_WORLD = "1" | ||
| 18 | |||
| 19 | do_test_git_as_user() { | ||
| 20 | cd ${S} | ||
| 21 | git status | ||
| 22 | git submodule status | ||
| 23 | } | ||
| 24 | addtask test_git_as_user after do_unpack | ||
| 25 | |||
| 26 | fakeroot do_test_git_as_root() { | ||
| 27 | cd ${S} | ||
| 28 | git status | ||
| 29 | git submodule status | ||
| 30 | } | ||
| 31 | do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot" | ||
| 32 | addtask test_git_as_root after do_unpack \ No newline at end of file | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb.upgraded new file mode 100644 index 0000000000..938c46b016 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb.upgraded | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | SUMMARY = "Test recipe for fetching git submodules" | ||
| 2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/" | ||
| 3 | LICENSE = "MIT" | ||
| 4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
| 5 | |||
| 6 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 7 | |||
| 8 | # Note: this is intentionally not the latest version in the original .bb | ||
| 9 | SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee" | ||
| 10 | PV = "0.1+git" | ||
| 11 | |||
| 12 | SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master" | ||
| 13 | UPSTREAM_CHECK_COMMITS = "1" | ||
| 14 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | ||
| 15 | |||
| 16 | EXCLUDE_FROM_WORLD = "1" | ||
| 17 | |||
| 18 | do_test_git_as_user() { | ||
| 19 | cd ${S} | ||
| 20 | git status | ||
| 21 | git submodule status | ||
| 22 | } | ||
| 23 | addtask test_git_as_user after do_unpack | ||
| 24 | |||
| 25 | fakeroot do_test_git_as_root() { | ||
| 26 | cd ${S} | ||
| 27 | git status | ||
| 28 | git submodule status | ||
| 29 | } | ||
| 30 | do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot" | ||
| 31 | addtask test_git_as_root after do_unpack \ No newline at end of file | ||
