More updates to allow tests when builddir != srcdir.
[idzebra-moved-to-github.git] / test / rusmarc / test1.sh
1 #!/bin/sh
2 # $Id: test1.sh,v 1.3 2004-06-15 08:06:34 adam Exp $
3
4 pp=${srcdir:-"."}
5
6 LOG=test1.log
7 rm -f $LOG
8 test -d tmp || mkdir tmp
9 test -d lock || mkdir lock
10 test -d register || mkdir register
11 ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init
12 ../../index/zebraidx -c $pp/zebra.cfg -l$LOG update records/*marc
13 ../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket &
14 sleep 1
15 # search text located in first record 600 $a
16 # term is koi8-r encoded
17 ../api/testclient unix:socket '@attr 1=21 úÁÍÑÔÉÎ' >tmp1
18 echo 'Result count: 1' >tmp2
19 kill `cat lock/zebrasrv.pid` || exit 1
20 diff tmp1 tmp2 || exit 2
21 rm -f tmp1 tmp2