summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/findutils/findutils/run-ptest
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 /meta/recipes-extended/findutils/findutils/run-ptest
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>
Diffstat (limited to 'meta/recipes-extended/findutils/findutils/run-ptest')
-rw-r--r--meta/recipes-extended/findutils/findutils/run-ptest57
1 files changed, 57 insertions, 0 deletions
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