summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/quilt
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/quilt')
-rw-r--r--meta/recipes-devtools/quilt/quilt.inc13
-rwxr-xr-xmeta/recipes-devtools/quilt/quilt/run-ptest6
2 files changed, 13 insertions, 6 deletions
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index f7ff958103..01fc22e996 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -61,6 +61,9 @@ do_install:append:class-native () {
61 touch ${D}${sysconfdir}/quiltrc 61 touch ${D}${sysconfdir}/quiltrc
62} 62}
63 63
64# The tests need to run as a non-root user, so pull in the ptest user
65DEPENDS:append:class-target = "${@bb.utils.contains('PTEST_ENABLED', '1', ' ptest-runner', '', d)}"
66
64do_install_ptest() { 67do_install_ptest() {
65 install ${WORKDIR}/test.sh ${D}${PTEST_PATH} 68 install ${WORKDIR}/test.sh ${D}${PTEST_PATH}
66 mkdir ${D}${PTEST_PATH}/test 69 mkdir ${D}${PTEST_PATH}/test
@@ -69,6 +72,14 @@ do_install_ptest() {
69 rm -f ${D}${PTEST_PATH}/test/mail.test ${D}${PTEST_PATH}/test/patch-wrapper.test 72 rm -f ${D}${PTEST_PATH}/test/mail.test ${D}${PTEST_PATH}/test/patch-wrapper.test
70} 73}
71 74
75# ptest.bbclass currently chowns the ptest directory explicitly, so we need to
76# change permission after that has happened so the ptest user can write a
77# temporary directory.
78do_install_ptest_base:append() {
79 chgrp ptest ${D}${PTEST_PATH}/test
80 chmod g+w ${D}${PTEST_PATH}/test
81}
82
72PACKAGES += "guards guards-doc" 83PACKAGES += "guards guards-doc"
73 84
74FILES:${PN} = "${sysconfdir} ${datadir}/quilt \ 85FILES:${PN} = "${sysconfdir} ${datadir}/quilt \
@@ -84,5 +95,5 @@ RDEPENDS:${PN}-ptest += "file sed gawk diffutils findutils ed perl \
84 perl-module-filehandle perl-module-getopt-std \ 95 perl-module-filehandle perl-module-getopt-std \
85 perl-module-posix perl-module-file-temp \ 96 perl-module-posix perl-module-file-temp \
86 perl-module-text-parsewords perl-module-overloading \ 97 perl-module-text-parsewords perl-module-overloading \
87 bash util-linux-getopt \ 98 bash util-linux-getopt ptest-runner \
88 " 99 "
diff --git a/meta/recipes-devtools/quilt/quilt/run-ptest b/meta/recipes-devtools/quilt/quilt/run-ptest
index 322508cbe2..f35a756d6b 100755
--- a/meta/recipes-devtools/quilt/quilt/run-ptest
+++ b/meta/recipes-devtools/quilt/quilt/run-ptest
@@ -1,7 +1,3 @@
1#!/bin/sh 1#!/bin/sh
2 2
3/usr/sbin/adduser --disabled-password --gecos "" quilttest 3su -c ./test.sh ptest
4
5su -c ./test.sh quilttest
6
7/usr/sbin/deluser quilttest