mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 00:32:12 +02:00
findutils: add ptest
Placed it in PTESTS_SLOW since it takes 36s to execute this ptest on qemu. (From OE-Core rev: da489ef6e36711cb40d26f64f292fb92a0073f4a) Signed-off-by: Oleh Matiusha <oleh.matiusha@globallogic.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
840a468553
commit
6c0a5594cc
@@ -72,6 +72,7 @@ PTESTS_SLOW = "\
|
||||
coreutils-ptest \
|
||||
dbus-test-ptest \
|
||||
e2fsprogs-ptest \
|
||||
findutils-ptest \
|
||||
glib-2.0-ptest \
|
||||
gstreamer1.0-ptest \
|
||||
libevent-ptest \
|
||||
|
||||
@@ -6,9 +6,11 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/"
|
||||
BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
|
||||
SECTION = "console/utils"
|
||||
|
||||
SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz"
|
||||
SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
inherit autotools gettext texinfo update-alternatives
|
||||
inherit autotools gettext texinfo update-alternatives ptest
|
||||
|
||||
ALTERNATIVE:${PN} = "find xargs"
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
|
||||
57
meta/recipes-extended/findutils/findutils/run-ptest
Normal file
57
meta/recipes-extended/findutils/findutils/run-ptest
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
# create temporary symlink to workaround missing oldfind
|
||||
ln -s /usr/bin/find /tmp/oldfind
|
||||
# make oldfind visible
|
||||
export PATH="/tmp:${PATH}"
|
||||
|
||||
export built_programs="find xargs locate updatedb"
|
||||
|
||||
# this gets substituted by sed during build
|
||||
export VERSION="__run_ptest_version__"
|
||||
|
||||
# define missing functions for tests/init.sh
|
||||
fu_path_prepend_ () {
|
||||
path_prepend_ $@
|
||||
}
|
||||
|
||||
print_ver_ () {
|
||||
:
|
||||
}
|
||||
|
||||
skip_if_root_ () {
|
||||
[ $(id -u) = 0 ] && exit 77;
|
||||
}
|
||||
|
||||
require_root_ () {
|
||||
[ $(id -u) = 0 ] || exit 77;
|
||||
}
|
||||
|
||||
expensive_ () {
|
||||
:
|
||||
}
|
||||
|
||||
export -f fu_path_prepend_
|
||||
export -f print_ver_
|
||||
export -f skip_if_root_
|
||||
export -f require_root_
|
||||
export -f expensive_
|
||||
|
||||
|
||||
for f in tests/*/*.sh; do
|
||||
bash $f ;
|
||||
case $? in
|
||||
0 )
|
||||
echo -n "PASS";;
|
||||
77 )
|
||||
echo -n "SKIP";;
|
||||
* )
|
||||
echo -n "FAIL";;
|
||||
esac
|
||||
echo ": $f"
|
||||
done
|
||||
|
||||
#remove symlink
|
||||
rm -f /tmp/oldfind
|
||||
|
||||
echo
|
||||
@@ -13,3 +13,14 @@ PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
|
||||
CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes"
|
||||
|
||||
EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
|
||||
|
||||
RDEPENDS:${PN}-ptest += "bash sed grep"
|
||||
|
||||
do_install_ptest:class-target() {
|
||||
mkdir -p ${D}${PTEST_PATH}/tests/
|
||||
cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
|
||||
|
||||
# substitute value in run-ptest with actual version
|
||||
sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user