Parent: [b70333] (diff)

Child: [fb874e] (diff)

Download this file

shared.sh    36 lines (29 with data), 768 Bytes

 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
# @(#$Id: shared.sh,v 1.4 2009-01-06 18:47:33 dockes Exp $ (C) 2006 J.F.Dockes
# shared code and variables for all tests
RECOLL_CONFDIR=/home/dockes/projets/fulltext/testrecoll/config
export RECOLL_CONFDIR
# Call this with the script's $0 as argument
initvariables() {
tstdata=/home/dockes/projets/fulltext/testrecoll
toptmp=${TMPDIR:-/tmp}/recolltsttmp
myname=`basename $1 .sh`
mystderr=$toptmp/${myname}.err
mystdout=$toptmp/${myname}.out
mydiffs=$toptmp/${myname}.diffs
}
fatal () {
set -f
echo
echo $*
exit 1
}
checkresult() {
if test -s "$mydiffs" ; then
fatal '*** ' $myname FAILED
else
rm -f $mydiffs
# for tests with a local index
rm -rf xapiandb aspdict.* missing recoll.conf
exit 0
fi
}