diff options
| -rw-r--r-- | meta/recipes-devtools/quilt/quilt.inc | 28 | ||||
| -rw-r--r-- | meta/recipes-devtools/quilt/quilt/Makefile | 14 | ||||
| -rwxr-xr-x | meta/recipes-devtools/quilt/quilt/run-ptest | 7 | ||||
| -rwxr-xr-x | meta/recipes-devtools/quilt/quilt/test.sh | 25 |
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 | ||
| 10 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ | 10 | SRC_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 | ||
| 64 | do_compile_ptest() { | ||
| 65 | oe_runmake bin/patch-wrapper test/.depend | ||
| 66 | } | ||
| 67 | |||
| 68 | do_install_ptest() { | 63 | do_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 | ||
| 77 | PACKAGES += "guards guards-doc" | 71 | PACKAGES += "guards guards-doc" |
| @@ -85,9 +79,9 @@ FILES:guards-doc = "${mandir}/man1/guards.1" | |||
| 85 | RDEPENDS:${PN} = "bash patch diffstat bzip2 util-linux less" | 79 | RDEPENDS:${PN} = "bash patch diffstat bzip2 util-linux less" |
| 86 | RDEPENDS:${PN}:class-native = "diffstat-native patch-native bzip2-native" | 80 | RDEPENDS:${PN}:class-native = "diffstat-native patch-native bzip2-native" |
| 87 | 81 | ||
| 88 | RDEPENDS:${PN}-ptest = "make file sed gawk diffutils findutils ed perl \ | 82 | RDEPENDS:${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 @@ | |||
| 1 | PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH) | ||
| 2 | QUILT_DIR := $(CURDIR)/quilt | ||
| 3 | QUILTRC := $(CURDIR)/test/test.quiltrc | ||
| 4 | export QUILT_DIR QUILTRC | ||
| 5 | CHECK_ENV := P=patches/; _P=../patches/; export P _P; | ||
| 6 | CHECK_ENV += QUILT_PC=.pc; export QUILT_PC | ||
| 7 | -include test/.depend | ||
| 8 | |||
| 9 | check-% : 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 | ||
| 3 | THIS_SH=/bin/sh | ||
| 4 | ln -sf /bin/ed /usr/bin/ed | ||
| 5 | /usr/sbin/adduser --disabled-password --gecos "" quilttest | 3 | /usr/sbin/adduser --disabled-password --gecos "" quilttest |
| 6 | su -c "${THIS_SH} ./test.sh" quilttest | 4 | |
| 5 | su -c ./test.sh quilttest | ||
| 6 | |||
| 7 | /usr/sbin/deluser quilttest | 7 | /usr/sbin/deluser quilttest |
| 8 | rm -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 @@ | |||
| 1 | for 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 | |||
| 3 | set -e -u | ||
| 4 | |||
| 5 | export LANG=C | ||
| 6 | export LC_ALL=C | ||
| 7 | export P=patches/ | ||
| 8 | export _P=../patches/ | ||
| 9 | export QUILTRC=$(pwd)/test/test.quiltrc | ||
| 10 | export QUILT_PC=.pc | ||
| 11 | export QUILT_DIR=/usr/share/quilt/ | ||
| 12 | |||
| 13 | # Specify on the commandline, else runs all of the tests | ||
| 14 | TESTS=${@:-test/*.test} | ||
| 15 | |||
| 16 | for 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 | ||
| 24 | done | ||
