summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleh Matiusha <oleh.matiusha@globallogic.com>2021-09-08 20:17:54 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-11 18:41:38 +0100
commit6c0a5594cc0aa02c154355e7b1d540ef5e26c9fe (patch)
treea216562d8a9ef84c1e934d480409e4c1eea9fe05
parent840a468553cdaf394987a1ff646ad7c3fd455e2f (diff)
downloadpoky-6c0a5594cc0aa02c154355e7b1d540ef5e26c9fe.tar.gz
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>
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc1
-rw-r--r--meta/recipes-extended/findutils/findutils.inc6
-rw-r--r--meta/recipes-extended/findutils/findutils/run-ptest57
-rw-r--r--meta/recipes-extended/findutils/findutils_4.8.0.bb11
4 files changed, 73 insertions, 2 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 3709998f29..2e324f8da4 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -72,6 +72,7 @@ PTESTS_SLOW = "\
72 coreutils-ptest \ 72 coreutils-ptest \
73 dbus-test-ptest \ 73 dbus-test-ptest \
74 e2fsprogs-ptest \ 74 e2fsprogs-ptest \
75 findutils-ptest \
75 glib-2.0-ptest \ 76 glib-2.0-ptest \
76 gstreamer1.0-ptest \ 77 gstreamer1.0-ptest \
77 libevent-ptest \ 78 libevent-ptest \
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc
index ea8a1b7afe..ddcc05750b 100644
--- a/meta/recipes-extended/findutils/findutils.inc
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -6,9 +6,11 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/"
6BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils" 6BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
7SECTION = "console/utils" 7SECTION = "console/utils"
8 8
9SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz" 9SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz \
10 file://run-ptest \
11 "
10 12
11inherit autotools gettext texinfo update-alternatives 13inherit autotools gettext texinfo update-alternatives ptest
12 14
13ALTERNATIVE:${PN} = "find xargs" 15ALTERNATIVE:${PN} = "find xargs"
14ALTERNATIVE_PRIORITY = "100" 16ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/findutils/findutils/run-ptest b/meta/recipes-extended/findutils/findutils/run-ptest
new file mode 100644
index 0000000000..ec71583c51
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/run-ptest
@@ -0,0 +1,57 @@
1#!/bin/bash
2
3# create temporary symlink to workaround missing oldfind
4ln -s /usr/bin/find /tmp/oldfind
5# make oldfind visible
6export PATH="/tmp:${PATH}"
7
8export built_programs="find xargs locate updatedb"
9
10# this gets substituted by sed during build
11export VERSION="__run_ptest_version__"
12
13# define missing functions for tests/init.sh
14fu_path_prepend_ () {
15 path_prepend_ $@
16}
17
18print_ver_ () {
19 :
20}
21
22skip_if_root_ () {
23 [ $(id -u) = 0 ] && exit 77;
24}
25
26require_root_ () {
27 [ $(id -u) = 0 ] || exit 77;
28}
29
30expensive_ () {
31 :
32}
33
34export -f fu_path_prepend_
35export -f print_ver_
36export -f skip_if_root_
37export -f require_root_
38export -f expensive_
39
40
41for f in tests/*/*.sh; do
42 bash $f ;
43 case $? in
44 0 )
45 echo -n "PASS";;
46 77 )
47 echo -n "SKIP";;
48 * )
49 echo -n "FAIL";;
50 esac
51 echo ": $f"
52done
53
54#remove symlink
55rm -f /tmp/oldfind
56
57echo
diff --git a/meta/recipes-extended/findutils/findutils_4.8.0.bb b/meta/recipes-extended/findutils/findutils_4.8.0.bb
index d8ccf4b8e1..b0e56da159 100644
--- a/meta/recipes-extended/findutils/findutils_4.8.0.bb
+++ b/meta/recipes-extended/findutils/findutils_4.8.0.bb
@@ -13,3 +13,14 @@ PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
13CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes" 13CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes"
14 14
15EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" 15EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
16
17RDEPENDS:${PN}-ptest += "bash sed grep"
18
19do_install_ptest:class-target() {
20 mkdir -p ${D}${PTEST_PATH}/tests/
21 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
22
23 # substitute value in run-ptest with actual version
24 sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest
25
26}