aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-selftest/recipes-test/postinst/postinst_1.0.bb48
-rw-r--r--meta/lib/oeqa/selftest/runtime-test.py34
2 files changed, 42 insertions, 40 deletions
diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
index 403462e7f2c..97a19873057 100644
--- a/meta-selftest/recipes-test/postinst/postinst_1.0.bb
+++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
@@ -1,28 +1,28 @@
LICENSE = "MIT"
+ALLOW_EMPTY_${PN}-at-rootfs = "1"
+ALLOW_EMPTY_${PN}-delayed-a = "1"
+ALLOW_EMPTY_${PN}-delayed-b = "1"
+ALLOW_EMPTY_${PN}-delayed-d = "1"
+ALLOW_EMPTY_${PN}-delayed-p = "1"
+ALLOW_EMPTY_${PN}-delayed-t = "1"
-ALLOW_EMPTY_${PN} = "1"
-ALLOW_EMPTY_${PN}-a = "1"
-ALLOW_EMPTY_${PN}-b = "1"
-ALLOW_EMPTY_${PN}-d = "1"
-ALLOW_EMPTY_${PN}-p = "1"
-ALLOW_EMPTY_${PN}-t = "1"
-
-PACKAGES =+ "${PN}-a ${PN}-b ${PN}-d ${PN}-p ${PN}-t"
-FILES_${PN}-a = ""
-FILES_${PN}-b = ""
-FILES_${PN}-d = ""
-FILES_${PN}-p = ""
-FILES_${PN}-t = ""
+PACKAGES += "${PN}-at-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-delayed-d ${PN}-delayed-p ${PN}-delayed-t"
+PROVIDES += "${PN}-at-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-delayed-d ${PN}-delayed-p ${PN}-delayed-t"
+FILES_${PN}-delayed-a = ""
+FILES_${PN}-delayed-b = ""
+FILES_${PN}-delayed-d = ""
+FILES_${PN}-delayed-p = ""
+FILES_${PN}-delayed-t = ""
# Runtime dependencies
-RDEPENDS_${PN}-a = "${PN}"
-RDEPENDS_${PN}-b = "${PN}-a"
-RDEPENDS_${PN}-d = "${PN}-b"
-RDEPENDS_${PN}-p = "${PN}-d"
-RDEPENDS_${PN}-t = "${PN}-p"
+RDEPENDS_${PN}-delayed-a = "${PN}-at-rootfs"
+RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a"
+RDEPENDS_${PN}-delayed-d = "${PN}-delayed-b"
+RDEPENDS_${PN}-delayed-p = "${PN}-delayed-d"
+RDEPENDS_${PN}-delayed-t = "${PN}-delayed-p"
# Main recipe post-install
-pkg_postinst_${PN} () {
+pkg_postinst_${PN}-at-rootfs () {
tfile="/etc/postinsta-test"
if test "x$D" != "x" then
# Need to run on first boot
@@ -33,7 +33,7 @@ pkg_postinst_${PN} () {
}
# Dependency recipes post-installs
-pkg_postinst_${PN}-a () {
+pkg_postinst_${PN}-delayed-a () {
efile="/etc/postinst-test"
tfile="/etc/postinsta-test"
rdeps="postinst"
@@ -51,7 +51,7 @@ pkg_postinst_${PN}-a () {
fi
}
-pkg_postinst_${PN}-b () {
+pkg_postinst_${PN}-delayed-b () {
efile="/etc/postinsta-test"
tfile="/etc/postinstb-test"
rdeps="postinsta"
@@ -69,7 +69,7 @@ pkg_postinst_${PN}-b () {
fi
}
-pkg_postinst_${PN}-d () {
+pkg_postinst_${PN}-delayed-d () {
efile="/etc/postinstb-test"
tfile="/etc/postinstd-test"
rdeps="postinstb"
@@ -87,7 +87,7 @@ pkg_postinst_${PN}-d () {
fi
}
-pkg_postinst_${PN}-p () {
+pkg_postinst_${PN}-delayed-p () {
efile="/etc/postinstd-test"
tfile="/etc/postinstp-test"
rdeps="postinstd"
@@ -105,7 +105,7 @@ pkg_postinst_${PN}-p () {
fi
}
-pkg_postinst_${PN}-t () {
+pkg_postinst_${PN}-delayed-t () {
efile="/etc/postinstp-test"
tfile="/etc/postinstt-test"
rdeps="postinstp"
diff --git a/meta/lib/oeqa/selftest/runtime-test.py b/meta/lib/oeqa/selftest/runtime-test.py
index 52ad22d2a3f..24b62454aec 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -110,29 +110,31 @@ class Postinst(oeSelfTest):
def test_verify_postinst(self):
"""
Summary: The purpose of this test is to verify the execution order of postinst Bugzilla ID: [5319]
- Expected 1. Compile a minimal image.
- 1. The compiled image will add the created layer with the recipes postinst[ abdpt]
- 2. Run qemux86
- 3. Validate the task execution order
+ Expected
+ 1. Compile a minimal image.
+ 2. The compiled image will add the created layer with the recipes postinst[ abdpt]
+ 3. Run qemux86
+ 4. Validate the task execution order
+ Author: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
"""
features = 'INHERIT += "testimage"\n'
- features += 'CORE_IMAGE_EXTRA_INSTALL += "postinst \
-postinst-a \
-postinst-b \
-postinst-d \
-postinst-p \
-postinst-t \
+ features += 'CORE_IMAGE_EXTRA_INSTALL += "postinst-at-rootfs \
+postinst-delayed-a \
+postinst-delayed-b \
+postinst-delayed-d \
+postinst-delayed-p \
+postinst-delayed-t \
"\n'
self.write_config(features)
bitbake('core-image-minimal -f')
- postinst_list = ['100-postinst',
- '101-postinst-a',
- '102-postinst-b',
- '103-postinst-d',
- '104-postinst-p',
- '105-postinst-t']
+ postinst_list = ['100-postinst-at-rootfs',
+ '101-postinst-delayed-a',
+ '102-postinst-delayed-b',
+ '103-postinst-delayed-d',
+ '104-postinst-delayed-p',
+ '105-postinst-delayed-t']
path_workdir = get_bb_var('WORKDIR','core-image-minimal')
workspacedir = 'testimage/qemu_boot_log'
workspacedir = os.path.join(path_workdir, workspacedir)