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.inc28
-rw-r--r--meta/recipes-devtools/quilt/quilt/Makefile14
-rwxr-xr-xmeta/recipes-devtools/quilt/quilt/run-ptest7
-rwxr-xr-xmeta/recipes-devtools/quilt/quilt/test.sh25
4 files changed, 38 insertions, 36 deletions
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index ec69705093..b4284dcafb 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -9,7 +9,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
9 9
10SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ 10SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
11 file://run-ptest \ 11 file://run-ptest \
12 file://Makefile \
13 file://test.sh \ 12 file://test.sh \
14 file://0001-tests-Allow-different-output-from-mv.patch \ 13 file://0001-tests-Allow-different-output-from-mv.patch \
15 file://fix-grep-3.8.patch \ 14 file://fix-grep-3.8.patch \
@@ -61,17 +60,12 @@ do_install:append:class-native () {
61 touch ${D}${sysconfdir}/quiltrc 60 touch ${D}${sysconfdir}/quiltrc
62} 61}
63 62
64do_compile_ptest() {
65 oe_runmake bin/patch-wrapper test/.depend
66}
67
68do_install_ptest() { 63do_install_ptest() {
69 tar -c --exclude=\*.in bin/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) 64 install ${WORKDIR}/test.sh ${D}${PTEST_PATH}
70 tar -c --exclude=\*.in compat/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) 65 mkdir ${D}${PTEST_PATH}/test
71 tar -c --exclude=\*.in quilt/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) 66 install ${S}/test/* ${D}${PTEST_PATH}/test
72 tar -c --exclude=mail.test --exclude=delete.test test/ | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test) 67 # mail needs a MTA, and the patch-wrapper is disabled
73 cp ${WORKDIR}/Makefile ${D}${PTEST_PATH} 68 rm -f ${D}${PTEST_PATH}/test/mail.test ${D}${PTEST_PATH}/test/patch-wrapper.test
74 cp ${WORKDIR}/test.sh ${D}${PTEST_PATH}
75} 69}
76 70
77PACKAGES += "guards guards-doc" 71PACKAGES += "guards guards-doc"
@@ -85,9 +79,9 @@ FILES:guards-doc = "${mandir}/man1/guards.1"
85RDEPENDS:${PN} = "bash patch diffstat bzip2 util-linux less" 79RDEPENDS:${PN} = "bash patch diffstat bzip2 util-linux less"
86RDEPENDS:${PN}:class-native = "diffstat-native patch-native bzip2-native" 80RDEPENDS:${PN}:class-native = "diffstat-native patch-native bzip2-native"
87 81
88RDEPENDS:${PN}-ptest = "make file sed gawk diffutils findutils ed perl \ 82RDEPENDS:${PN}-ptest += "file sed gawk diffutils findutils ed perl \
89 perl-module-filehandle perl-module-getopt-std \ 83 perl-module-filehandle perl-module-getopt-std \
90 perl-module-posix perl-module-file-temp \ 84 perl-module-posix perl-module-file-temp \
91 perl-module-text-parsewords perl-module-overloading \ 85 perl-module-text-parsewords perl-module-overloading \
92 bash util-linux-getopt patch \ 86 bash util-linux-getopt \
93 " 87 "
diff --git a/meta/recipes-devtools/quilt/quilt/Makefile b/meta/recipes-devtools/quilt/quilt/Makefile
deleted file mode 100644
index 1f6cd2479c..0000000000
--- a/meta/recipes-devtools/quilt/quilt/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
1PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH)
2QUILT_DIR := $(CURDIR)/quilt
3QUILTRC := $(CURDIR)/test/test.quiltrc
4export QUILT_DIR QUILTRC
5CHECK_ENV := P=patches/; _P=../patches/; export P _P;
6CHECK_ENV += QUILT_PC=.pc; export QUILT_PC
7-include test/.depend
8
9check-% : test/%.test
10 @LANG=C; LC_ALL=C; \
11 export LANG LC_ALL; \
12 $(CHECK_ENV); \
13 cd $(<D); \
14 ./run -q $(<F)
diff --git a/meta/recipes-devtools/quilt/quilt/run-ptest b/meta/recipes-devtools/quilt/quilt/run-ptest
index d2de5c855a..322508cbe2 100755
--- a/meta/recipes-devtools/quilt/quilt/run-ptest
+++ b/meta/recipes-devtools/quilt/quilt/run-ptest
@@ -1,8 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3THIS_SH=/bin/sh
4ln -sf /bin/ed /usr/bin/ed
5/usr/sbin/adduser --disabled-password --gecos "" quilttest 3/usr/sbin/adduser --disabled-password --gecos "" quilttest
6su -c "${THIS_SH} ./test.sh" quilttest 4
5su -c ./test.sh quilttest
6
7/usr/sbin/deluser quilttest 7/usr/sbin/deluser quilttest
8rm -f /usr/bin/ed
diff --git a/meta/recipes-devtools/quilt/quilt/test.sh b/meta/recipes-devtools/quilt/quilt/test.sh
index 6563e4a2fb..7dac8f4423 100755
--- a/meta/recipes-devtools/quilt/quilt/test.sh
+++ b/meta/recipes-devtools/quilt/quilt/test.sh
@@ -1 +1,24 @@
1for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? -eq 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done 1#! /bin/sh
2
3set -e -u
4
5export LANG=C
6export LC_ALL=C
7export P=patches/
8export _P=../patches/
9export QUILTRC=$(pwd)/test/test.quiltrc
10export QUILT_PC=.pc
11export QUILT_DIR=/usr/share/quilt/
12
13# Specify on the commandline, else runs all of the tests
14TESTS=${@:-test/*.test}
15
16for FILENAME in $TESTS; do
17 TESTNAME=$(basename $FILENAME .test)
18 ./test/run $FILENAME
19 if [ $? -eq 0 ];
20 then echo PASS: $TESTNAME
21 else
22 echo FAIL: $TESTNAME
23 fi
24done