1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh -e
cp data/ldap.ini ../config/
cp data/database.ini ../config/
./start_ldap
trap "./stop_ldap" INT HUP QUIT EXIT ERR
case "$1" in
'')
testfile="alltests.php"
;;
unit|func)
testfile="$1tests.php"
;;
*)
testfile="functests.php $*"
;;
esac
TFILE=$(mktemp)
php4 -Cq ./$testfile >> $TFILE || true
rm -f ../config/ldap.ini ../config/database.ini
if [ $( wc -l "$TFILE" | cut -d ' ' -f 1 ) -gt 20 ]; then
less $TFILE
else
cat $TFILE
fi
rm $TFILE
|