blob: ec71583c5115001cec0bf56a57db302f7ec0f91e [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001#!/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