summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorTobias Pistora <pistora.tobias@gmail.com>2025-08-13 11:20:42 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-14 10:31:10 +0100
commit921faf324658371193b1f0847ebc1912d7fef25d (patch)
treed74696244e096e3fd38c61107dc64bc2694b3faf /meta-selftest
parent4c7b0007327d592b8f5d1f50ebb0325dc483bd87 (diff)
downloadpoky-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.bb32
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test5_git.bb.upgraded31
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 @@
1SUMMARY = "Test recipe for fetching git submodules"
2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6INHIBIT_DEFAULT_DEPS = "1"
7
8# Note: this is intentionally not the latest version in the original .bb
9SRCREV = "132fea6e4dee56b61bcf5721c94e8b2445c6a017"
10PV = "0.1+git"
11PR = "r2"
12
13SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master"
14UPSTREAM_CHECK_COMMITS = "1"
15RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
16
17EXCLUDE_FROM_WORLD = "1"
18
19do_test_git_as_user() {
20 cd ${S}
21 git status
22 git submodule status
23}
24addtask test_git_as_user after do_unpack
25
26fakeroot do_test_git_as_root() {
27 cd ${S}
28 git status
29 git submodule status
30}
31do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot"
32addtask 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 @@
1SUMMARY = "Test recipe for fetching git submodules"
2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6INHIBIT_DEFAULT_DEPS = "1"
7
8# Note: this is intentionally not the latest version in the original .bb
9SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee"
10PV = "0.1+git"
11
12SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master"
13UPSTREAM_CHECK_COMMITS = "1"
14RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
15
16EXCLUDE_FROM_WORLD = "1"
17
18do_test_git_as_user() {
19 cd ${S}
20 git status
21 git submodule status
22}
23addtask test_git_as_user after do_unpack
24
25fakeroot do_test_git_as_root() {
26 cd ${S}
27 git status
28 git submodule status
29}
30do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot"
31addtask test_git_as_root after do_unpack \ No newline at end of file