diff options
author | Jose Perez Carranza <jose.perez.carranza@linux.intel.com> | 2016-12-06 11:29:01 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | 333890953db568118b34692e9beb15c3c8eecdd0 (patch) | |
tree | 0a94b063b245689f57c928e67c21098012632a62 /meta-selftest | |
parent | 23d1c4ffb7791e2f75f0eaa84dd6b936d3b861f7 (diff) | |
download | poky-333890953db568118b34692e9beb15c3c8eecdd0.tar.gz |
postinst: Add a test case to verify postinst scripts behavior
Add test case that verify behavior of postinst scripts at
roofts time and when is delayed to the first boot directly
on the target.
(From OE-Core rev: 82b171f3b37e6733997fc1e7685b7cac5a3476e7)
Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r-- | meta-selftest/recipes-test/postinst/postinst_1.0.bb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/meta-selftest/recipes-test/postinst/postinst_1.0.bb index 97a1987305..6d49734277 100644 --- a/meta-selftest/recipes-test/postinst/postinst_1.0.bb +++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb | |||
@@ -24,6 +24,7 @@ RDEPENDS_${PN}-delayed-t = "${PN}-delayed-p" | |||
24 | # Main recipe post-install | 24 | # Main recipe post-install |
25 | pkg_postinst_${PN}-at-rootfs () { | 25 | pkg_postinst_${PN}-at-rootfs () { |
26 | tfile="/etc/postinsta-test" | 26 | tfile="/etc/postinsta-test" |
27 | touch "$D"/this-was-created-at-rootfstime | ||
27 | if test "x$D" != "x" then | 28 | if test "x$D" != "x" then |
28 | # Need to run on first boot | 29 | # Need to run on first boot |
29 | exit 1 | 30 | exit 1 |
@@ -42,6 +43,7 @@ pkg_postinst_${PN}-delayed-a () { | |||
42 | # Need to run on first boot | 43 | # Need to run on first boot |
43 | exit 1 | 44 | exit 1 |
44 | else | 45 | else |
46 | touch /etc/this-was-created-at-first-boot | ||
45 | if test -e $efile ; then | 47 | if test -e $efile ; then |
46 | echo 'success' > $tfile | 48 | echo 'success' > $tfile |
47 | else | 49 | else |