diff options
author | Oleh Matiusha <oleh.matiusha@globallogic.com> | 2021-09-08 20:17:54 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-11 18:41:38 +0100 |
commit | 6c0a5594cc0aa02c154355e7b1d540ef5e26c9fe (patch) | |
tree | a216562d8a9ef84c1e934d480409e4c1eea9fe05 /meta/recipes-extended/findutils/findutils/run-ptest | |
parent | 840a468553cdaf394987a1ff646ad7c3fd455e2f (diff) | |
download | poky-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-ptest | 57 |
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 | ||
4 | ln -s /usr/bin/find /tmp/oldfind | ||
5 | # make oldfind visible | ||
6 | export PATH="/tmp:${PATH}" | ||
7 | |||
8 | export built_programs="find xargs locate updatedb" | ||
9 | |||
10 | # this gets substituted by sed during build | ||
11 | export VERSION="__run_ptest_version__" | ||
12 | |||
13 | # define missing functions for tests/init.sh | ||
14 | fu_path_prepend_ () { | ||
15 | path_prepend_ $@ | ||
16 | } | ||
17 | |||
18 | print_ver_ () { | ||
19 | : | ||
20 | } | ||
21 | |||
22 | skip_if_root_ () { | ||
23 | [ $(id -u) = 0 ] && exit 77; | ||
24 | } | ||
25 | |||
26 | require_root_ () { | ||
27 | [ $(id -u) = 0 ] || exit 77; | ||
28 | } | ||
29 | |||
30 | expensive_ () { | ||
31 | : | ||
32 | } | ||
33 | |||
34 | export -f fu_path_prepend_ | ||
35 | export -f print_ver_ | ||
36 | export -f skip_if_root_ | ||
37 | export -f require_root_ | ||
38 | export -f expensive_ | ||
39 | |||
40 | |||
41 | for 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" | ||
52 | done | ||
53 | |||
54 | #remove symlink | ||
55 | rm -f /tmp/oldfind | ||
56 | |||
57 | echo | ||