UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-inherit autotools gettext perlnative pkgconfig perl-version update-alternatives bash-completion
+inherit autotools gettext perlnative pkgconfig perl-version ptest update-alternatives bash-completion
PERL:class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
fi
}
+do_install_ptest () {
+ install -d ${D}${PTEST_PATH}/tests ${D}${PTEST_PATH}/src/sh
+ install -m 0755 ${S}/src/sh/dpkg-error.sh ${D}${PTEST_PATH}/src/sh/
+ cp --preserve=mode,timestamps -R ${S}/tests/* ${D}${PTEST_PATH}/tests
+
+ # The folder has a number of test folders called DEBIAN, but these are
+ # explicitly omitted from some packages, e.g. from rpm.
+ # However these are essential for the tests, so rename them to DEBIAN-ptest, and at runtime
+ # from the run-ptest script restore their names
+ find ${D}${PTEST_PATH}/tests -name DEBIAN -type d | xargs -n1 -I{} mv "{}" "{}-ptest"
+}
+
PROV = "virtual/update-alternatives"
PROV:class-native = ""
PROV:class-nativesdk = ""
perl-module-time-hires perl-module-time-piece \
perl-module-xsloader"
+RDEPENDS:${PN}-ptest += "make coreutils findutils"
+
# Split out start-stop-daemon to its own package. Note that it
# is installed in a different directory than the one used for
# the bitbake version.
--- /dev/null
+#!/bin/sh
+
+rm -f dpkg-test.log
+cd tests
+
+FAILED_TESTS=0
+ALL_TESTS=0
+
+# During installation the "DEBIAN" folders are renamed to avoid
+# problems with packaging. Restore their names here.
+for d in $(find . -name DEBIAN-ptest -type d); do
+ dname=$(dirname "$d")
+ mv ${d} ${dname}/DEBIAN
+done
+
+# This allows running tests that require root access (which we have)
+export DPKG_AS_ROOT=1
+
+for test in $(grep "TESTS_PASS +=" Makefile | cut -f3 -d" "); do
+ ALL_TESTS=$((ALL_TESTS + 1))
+ make ${test}-test >> ../dpkg-test.log 2>&1
+
+ if [ $? -eq 0 ]; then
+ echo PASS: $test
+ else
+ echo FAIL: $test
+ FAILED_TESTS=$((FAILED_TESTS + 1))
+ fi
+done
+
+if [ $FAILED_TESTS -eq 0 ]; then
+ echo All $ALL_TESTS tests passed
+else
+ echo $FAILED_TESTS of $ALL_TESTS tests failed
+fi
file://remove-tar-no-timestamp.patch \
file://arch_pm.patch \
file://add_armeb_triplet_entry.patch \
+ file://run-ptest \
file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
file://0001-script.c-avoid-use-of-chroot.patch \
file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \