Namazu-devel-ja(旧)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VPATH and tests



>                                            千葉市中央区長洲
>                                                    藤原  誠
[namazu-devel-ja] X-Mail-Count: 01987
を修正しました。

○ (1) namazu/tests/Makefile.am
TESTS に $(srcdir) が要るかどうかという点

[namazu-devel-ja : No.01991] の次の記事の中で
From: Ryuji Abe <raeva@xxxxxxxxxxxx>
Subject: Re: preparing next release
Date: Wed, 12 Sep 2001 12:55:00 +0900
Message-ID: <200109120355.MAA18999@xxxxxxxxxxxxxxx>

> * configure の VPATH 対応 patch
>   [namazu-devel-ja] X-Mail-Count: 01987

安部さん> TESTSに$(srcdir)を入れる必要はないと思いますが。
安部さん> make checkはあまり重大でないので2.0.8以降で対応
安部さん> しましょう。
ということで、

「$(srcdir)を沢山入れるのは変」
「$(srcdir)を一つでも入れるのは変」
の一応前者の意味かなと思いまして、短かくしました。

○ (2) namazu/tests/ja-namazu-cgi-1 不要の件

[namazu-devel-ja : No.01987] の次の記事の中で
From: 藤原  誠 / Makoto Fujiwara <makoto@xxxxx>
Subject: Re: (VPATH) nmz/i18n.h:8: libintl.h: No such file or directory
Date: Wed, 12 Sep 2001 11:16:58 +0900
Message-ID: <yfmvgipf90l.wl@xxxxxxx>
藤原> ## namazu/tests/ja-namazu-cgi-1	2001/09/12 01:07:53
藤原> ## の変更は不要のような気がします。
ということでこれは変更無(patch 無)。
本当は -h 海というのは不要だと思いますが。

○ (3) $LOG 
echo '  *** starting ' $0 >>$LOG
を一行づつ追加
test-log の中を見る時の効率の点

○ (4) >> $LOG
上記 (3) をやって見たら、二か所くらい > $LOG となって
いるところが見つかったので >> $LOG に直した。

ということで commit しようと思っています。
---
(藤原)
http://www.ki.nu/software/namazu/tutorial/
Index: namazu/scripts/gcnmz.in
===================================================================
RCS file: /storage/cvsroot/namazu/scripts/gcnmz.in,v
retrieving revision 1.8
diff -u -r1.8 gcnmz.in
--- namazu/scripts/gcnmz.in	2000/03/15 07:28:24	1.8
+++ namazu/scripts/gcnmz.in	2001/09/14 01:04:22
@@ -6,7 +6,10 @@
 # gcnmz.pl - by furukawa@xxxxxxxxxxxx
 #
 
-push(@INC, '../pl');
+my $pldir = '';
+if ( $ENV{'srcdir'} ) {
+    $pldir = $ENV{'srcdir'}.'/' }; #  VPATH for make check
+push(@INC, $pldir."../pl");
 push(@INC, '@PERLLIBDIR@');
 require 'nmzidx.pl';
 
Index: namazu/scripts/mknmz.in
===================================================================
RCS file: /storage/cvsroot/namazu/scripts/mknmz.in,v
retrieving revision 1.85.4.10
diff -u -r1.85.4.10 mknmz.in
--- namazu/scripts/mknmz.in	2001/08/22 06:16:20	1.85.4.10
+++ namazu/scripts/mknmz.in	2001/09/14 01:04:27
@@ -334,13 +334,21 @@
     };
 
     # For executing mknmz in scripts directory
-    $TEMPLATEDIR = "../template" if -f "../template/NMZ.head";
+    my $srcdir = '';
+    if (defined($ENV{'srcdir'})) {      ## for VPATH ;make check
+	$srcdir = $ENV{'srcdir'}.'/';}
+    my $tempdir = $srcdir . "../template";
+    $TEMPLATEDIR = $tempdir if -f $tempdir."/NMZ.head";
 }
 
 sub preload_modules () { 
     unshift @INC, $LIBDIR;
-    unshift @INC, "../pl";	# FIXME: remove the workaround for 
-    unshift @INC, "../filter";	# test suites.
+    my $srcdir;
+    if (defined($ENV{'srcdir'})) {      ## for VPATH ;make check
+	$srcdir = $ENV{'srcdir'} .'/';}
+    unshift @INC,          "../pl";	# FIXME: remove the workaround for 
+    unshift @INC, $srcdir. "../pl";	# FIXME: remove the workaround for   (util.pl)
+    unshift @INC, $srcdir. "../filter";	# test suites.
 
     require "conf.pl" || die "unable to require \"conf.pl\"\n";
     require "util.pl" || die "unable to require \"util.pl\"\n";
@@ -372,9 +380,12 @@
 
     # Check filter modules
     my @filters = ();
-    if (-f "../filter/gfilter.pl") { # to ease developing
-	@filters = (glob("../filter/*.pl"), glob("$FILTERDIR/*.pl"));
-	unshift @INC, "../filter";
+    my $srcfilterdir = '';  # for make check in VPATH environment
+    if (defined($ENV{'srcdir'})) {
+	$srcfilterdir = $ENV{'srcdir'}.'/../filter';}
+    if (-f "$srcfilterdir/gfilter.pl") { # to ease developing
+	@filters = (glob("$srcfilterdir/*.pl"), glob("$FILTERDIR/*.pl"));
+	unshift @INC, "$srcfilterdir/filter";
     } else {
 	@filters = glob "$FILTERDIR/*.pl";
     }
Index: namazu/tests/Makefile.am
===================================================================
RCS file: /storage/cvsroot/namazu/tests/Makefile.am,v
retrieving revision 1.23.4.7
diff -u -r1.23.4.7 Makefile.am
--- namazu/tests/Makefile.am	2001/07/31 07:16:11	1.23.4.7
+++ namazu/tests/Makefile.am	2001/09/14 01:04:27
@@ -18,4 +18,4 @@
 clean-local:
 	rm -rf test-log tmp-data tmp.* idx[0-9]* ja-idx[0-9]*
 
-EXTRA_DIST = $(TESTS) select-data
+EXTRA_DIST = $(srcdir)/$(TESTS) select-data
Index: namazu/tests/gcnmz-1
===================================================================
RCS file: /storage/cvsroot/namazu/tests/gcnmz-1,v
retrieving revision 1.7
diff -u -r1.7 gcnmz-1
--- namazu/tests/gcnmz-1	2000/09/14 05:49:02	1.7
+++ namazu/tests/gcnmz-1	2001/09/14 01:04:27
@@ -3,7 +3,7 @@
 # Test for gcnmz.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 TMPDATA=`pwd`/tmp-data
 
 if test ! -d idx5; then
Index: namazu/tests/ja-mknmz-1
===================================================================
RCS file: /storage/cvsroot/namazu/tests/ja-mknmz-1,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 ja-mknmz-1
--- namazu/tests/ja-mknmz-1	2001/07/05 07:02:42	1.1.2.2
+++ namazu/tests/ja-mknmz-1	2001/09/14 01:04:27
@@ -3,7 +3,7 @@
 # Test for Japanese encoding
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/ja-spec
+TARGET=$srcdir/data/ja-spec
 IDX=ja-idx1
 
 EXEC=no
@@ -24,6 +24,5 @@
     rm -f $IDX/NMZ.*
 fi
 
-cd ../scripts
-./mknmz -O ../tests/$IDX $TARGET >> $LOG
+../scripts/mknmz -O $IDX $TARGET >> $LOG
 exit $?
Index: namazu/tests/mknmz-1
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-1,v
retrieving revision 1.4
diff -u -r1.4 mknmz-1
--- namazu/tests/mknmz-1	2000/02/29 04:25:35	1.4
+++ namazu/tests/mknmz-1	2001/09/14 01:04:28
@@ -2,8 +2,10 @@
 #
 # Test for simple indexing.
 #
+# return data/en or data/ja depending environment
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx1; then
     mkdir idx1
@@ -12,6 +14,5 @@
 fi
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx1 $TARGET >> $LOG
+../scripts/mknmz  -O idx1 $TARGET >> $LOG
 exit $?
Index: namazu/tests/mknmz-10
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-10,v
retrieving revision 1.2
diff -u -r1.2 mknmz-10
--- namazu/tests/mknmz-10	2000/09/18 07:37:24	1.2
+++ namazu/tests/mknmz-10	2001/09/14 01:04:28
@@ -3,8 +3,9 @@
 # Test for priority of mknmzrc and command line option.
 #
 
-LOG=`pwd`/test-log
-TARGET=`./select-data`
+LOG=test-log
+TARGET=`$srcdir/select-data`
+echo ' *** starting ' $0 >>$LOG
 
 if test ! -d idx12; then
     mkdir idx12
@@ -22,12 +23,11 @@
 tmprc="$HOME/.mknmzrc"
 echo '$conf::ALLOW_FILE=".*\\.txt"' > $tmprc
 
-cd ../scripts
-./mknmz -O ../tests/idx12 $TARGET >> $LOG 2>&1
-./mknmz --allow='.*\.html' -O ../tests/idx13 $TARGET >> $LOG 2>&1
+../scripts/mknmz -O                    idx12 $TARGET >> $LOG 2>&1
+../scripts/mknmz --allow='.*\.html' -O idx13 $TARGET >> $LOG 2>&1
 rm $tmprc
-grep -v '\.txt' ../tests/idx12/NMZ.field.uri >> $LOG && exit 1
-grep '\.txt' ../tests/idx12/NMZ.field.uri >> $LOG || exit $?
-grep -v '\.html' ../tests/idx13/NMZ.field.uri >> $LOG && exit 1
-grep '\.html' ../tests/idx13/NMZ.field.uri >> $LOG
+grep -v '\.txt'  idx12/NMZ.field.uri >> $LOG && exit 1
+grep '\.txt'     idx12/NMZ.field.uri >> $LOG || exit $?
+grep -v '\.html' idx13/NMZ.field.uri >> $LOG && exit 1
+grep '\.html'    idx13/NMZ.field.uri >> $LOG
 exit $?
Index: namazu/tests/mknmz-11
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-11,v
retrieving revision 1.3
diff -u -r1.3 mknmz-11
--- namazu/tests/mknmz-11	2001/04/28 07:29:22	1.3
+++ namazu/tests/mknmz-11	2001/09/14 01:04:28
@@ -4,9 +4,15 @@
 #
 
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/symlink
+DATA=`pwd`/data
+TARGET=$DATA/symlink
 IDXDIR=idx14
+echo '  *** starting ' $0 >>$LOG
 
+if test ! -d $DATA; then
+   mkdir $DATA
+fi
+
 if test ! -d $IDXDIR; then
     mkdir $IDXDIR
 else
@@ -14,12 +20,12 @@
 fi
 
 if test ! -h $TARGET; then
-    ln -s `pwd`/data/en $TARGET
+    ln -s ../$srcdir/data/en $TARGET
 fi
-TXTCOUNT=`ls ./data/symlink/*.txt|wc -l`
+TXTCOUNT=`ls $TARGET/*.txt|wc -l`
+
 
-cd ../scripts
-./mknmz --allow='.*.txt' -O ../tests/$IDXDIR $TARGET >> $LOG 2>&1
-RESULTCOUNT=`wc -l < ../tests/$IDXDIR/NMZ.field.uri`
+../scripts/mknmz --allow='.*.txt' -O $IDXDIR $TARGET >> $LOG 2>&1
+RESULTCOUNT=`wc -l < $IDXDIR/NMZ.field.uri`
 test $TXTCOUNT -eq $RESULTCOUNT
-exit $?
\ No newline at end of file
+exit $?
Index: namazu/tests/mknmz-12
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-12,v
retrieving revision 1.2
diff -u -r1.2 mknmz-12
--- namazu/tests/mknmz-12	2001/04/03 09:32:22	1.2
+++ namazu/tests/mknmz-12	2001/09/14 01:04:28
@@ -4,10 +4,12 @@
 #
 
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/filter
+TARGET=$srcdir/data/filter/  # from script
+echo '  *** starting ' $0 >>$LOG
+
 IDXDIR=idx15
-TXTCOUNT=`ls ./data/filter/*.txt|wc -l`
-FDIR=`pwd`/data/filter
+TXTCOUNT=`ls $srcdir/data/filter/*.txt|wc -l`
+FDIR=$srcdir/data/filter
 MKNMZRC=`pwd`/mknmzrc-mknmz12
 export MKNMZRC
 
@@ -17,15 +19,18 @@
     rm -f $IDXDIR/NMZ.*
 fi
 
-cd ../scripts
-echo "package conf; \$FILTERDIR='$FDIR'; 1;" > ../tests/mknmzrc-mknmz12
-RESULTCOUNT=`./mknmz -C|egrep x-test|wc -l`
-rm -f ../tests/mknmzrc-mknmz12
+echo "package conf; \$FILTERDIR='$FDIR'; 1;" > mknmzrc-mknmz12
+RESULTCOUNT=`../scripts/mknmz -C|egrep x-test|wc -l`
+rm -f mknmzrc-mknmz12
 test $RESULTCOUNT -eq 1 || exit $?
+
+echo "package conf; \$FILTERDIR='$FDIR'; 1;" > mknmzrc-mknmz12
+if  test ! -d $IDXDIR; then 
+    mkdir     $IDXDIR
+fi
 
-echo "package conf; \$FILTERDIR='$FDIR'; 1;" > ../tests/mknmzrc-mknmz12
-./mknmz --allow='.*.txt' -O ../tests/$IDXDIR $TARGET >> $LOG 2>&1
-rm -f ../tests/mknmzrc-mknmz12
-RESULTCOUNT=`wc -l < ../tests/$IDXDIR/NMZ.field.uri`
+../scripts/mknmz --allow='.*.txt' -O $IDXDIR $TARGET >> $LOG 2>&1
+rm -f mknmzrc-mknmz12
+RESULTCOUNT=`wc -l < $IDXDIR/NMZ.field.uri`
 test $TXTCOUNT -eq $RESULTCOUNT
 exit $?
Index: namazu/tests/mknmz-13
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-13,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 mknmz-13
--- namazu/tests/mknmz-13	2001/07/04 09:58:07	1.1.2.2
+++ namazu/tests/mknmz-13	2001/09/14 01:04:28
@@ -5,6 +5,7 @@
 LOG=`pwd`/test-log
 SRCIDXDIR=idx1
 IDXDIR=idx16
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d $IDXDIR; then
     mkdir $IDXDIR
Index: namazu/tests/mknmz-14
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-14,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 mknmz-14
--- namazu/tests/mknmz-14	2001/07/10 02:13:42	1.1.2.1
+++ namazu/tests/mknmz-14	2001/09/14 01:04:28
@@ -3,8 +3,9 @@
 # Test for emphasized keyword.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/emphasize
+TARGET=$srcdir/data/emphasize
 IDX=idx17
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d $IDX; then
     mkdir $IDX
@@ -13,6 +14,5 @@
 fi
 
 # Simple indexing.
-cd ../scripts
-./mknmz -O ../tests/$IDX $TARGET >> $LOG
+../scripts/mknmz -O $IDX $TARGET >> $LOG
 exit $?
Index: namazu/tests/mknmz-15
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-15,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 mknmz-15
--- namazu/tests/mknmz-15	2001/07/10 07:03:00	1.1.2.1
+++ namazu/tests/mknmz-15	2001/09/14 01:04:28
@@ -3,9 +3,10 @@
 # Test for duplicated field.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/dup-field
+TARGET=$srcdir/data/dup-field
 IDX=idx18
 CONF=`pwd`/tmp.mknmzrc
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d $IDX; then
     mkdir $IDX
@@ -17,10 +18,9 @@
 echo '$SEARCH_FIELD = "keywords|message-id|subject|from|date|uri|newsgroups|to|summary|size";' >> $CONF
 echo '$META_TAGS = "keywords|description";' >> $CONF
 
-cd ../scripts
-./mknmz --meta -f $CONF -O ../tests/$IDX $TARGET > $LOG 2>&1
+../scripts/mknmz --meta -f $CONF -O $IDX $TARGET >> $LOG 2>&1
 
-COUNT=`egrep 'test' ../tests/$IDX/NMZ.field.keywords|wc -l`
+COUNT=`egrep 'test' $IDX/NMZ.field.keywords|wc -l`
 
 if [ $COUNT -ne 1 ]
 then
Index: namazu/tests/mknmz-16
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-16,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 mknmz-16
--- namazu/tests/mknmz-16	2001/07/31 07:16:11	1.1.2.1
+++ namazu/tests/mknmz-16	2001/09/14 01:04:28
@@ -5,6 +5,7 @@
 LOG=`pwd`/test-log
 TARGET=`pwd`/data/dup-field
 IDX=idx19
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d $IDX; then
     mkdir $IDX
@@ -24,7 +25,6 @@
     echo "namazu $i" > $TMPDATA/$i.txt
 done
 
-cd ../scripts
-./mknmz -O ../tests/$IDX $TMPDATA > $LOG 2>&1
+../scripts/mknmz -O $IDX $TMPDATA >> $LOG 2>&1
 
 exit 0
Index: namazu/tests/mknmz-2
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-2,v
retrieving revision 1.6
diff -u -r1.6 mknmz-2
--- namazu/tests/mknmz-2	2000/03/29 15:18:02	1.6
+++ namazu/tests/mknmz-2	2001/09/14 01:04:28
@@ -3,7 +3,8 @@
 # Test for incremental indexing.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx2; then
     mkdir idx2
@@ -11,11 +12,10 @@
     rm -f idx2/NMZ.*
 fi
 
-cd ../scripts
-targets=`cat ../tests/idx1/NMZ.field.uri`
+targets=`cat idx1/NMZ.field.uri`
 
 for target in $targets; do
-   ./mknmz --no-delete -O ../tests/idx2 $target \
+   ../scripts/mknmz --no-delete -O idx2 $target \
 	>> $LOG
     test "$?" != "0" && exit 1  # error if not success
 done;
Index: namazu/tests/mknmz-3
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-3,v
retrieving revision 1.5
diff -u -r1.5 mknmz-3
--- namazu/tests/mknmz-3	2000/02/29 04:25:35	1.5
+++ namazu/tests/mknmz-3	2001/09/14 01:04:28
@@ -3,7 +3,8 @@
 # Test for indexing with --checkpoint and $ON_MEMORY_MAX is 0.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx3; then
     mkdir idx3
@@ -16,8 +17,7 @@
 echo '$conf::ON_MEMORY_MAX=0' > $tmprc
 
 # Simple indexing
-cd ../scripts 
-./mknmz --checkpoint -f $tmprc -O ../tests/idx3 $TARGET >> $LOG
+../scripts/mknmz --checkpoint -f $tmprc -O idx3 $TARGET >> $LOG
 rm -f $tmprc
 
 exit $?
Index: namazu/tests/mknmz-4
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-4,v
retrieving revision 1.6
diff -u -r1.6 mknmz-4
--- namazu/tests/mknmz-4	2000/09/14 05:49:02	1.6
+++ namazu/tests/mknmz-4	2001/09/14 01:04:28
@@ -3,7 +3,8 @@
 # Test for deleting documents in an index.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx4; then
     mkdir idx4
@@ -19,11 +20,10 @@
 cp -rp $TARGET tmp-data
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx4 $TMPDATA >> $LOG
+../scripts/mknmz -O idx4 $TMPDATA >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx4/NMZ.status`
+prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx4/NMZ.status`
 
 # Remove some documents.
 cd $TMPDATA
@@ -31,11 +31,10 @@
 cd ../
 
 # Update the index.
-cd ../scripts 
-./mknmz --update=../tests/idx4 >> $LOG
+../scripts/mknmz --update=idx4 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-postdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx4/NMZ.status`
+postdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx4/NMZ.status`
 
 echo "predocnum:" $prevdocnum, "postdocnum:" $postdocnum >> $LOG
 test $prevdocnum -le $postdocnum && exit 1  # error if prev <= post
Index: namazu/tests/mknmz-5
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-5,v
retrieving revision 1.4
diff -u -r1.4 mknmz-5
--- namazu/tests/mknmz-5	2000/09/14 05:49:02	1.4
+++ namazu/tests/mknmz-5	2001/09/14 01:04:28
@@ -3,8 +3,9 @@
 # Test for updating documents in an index.
 #
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
 TMPDATA=`pwd`/tmp-data
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx7; then
     mkdir idx7
@@ -19,11 +20,11 @@
 cp -rp $TARGET tmp-data
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx7 $TMPDATA >> $LOG
+
+../scripts/mknmz -O idx7 $TMPDATA >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx7/NMZ.status`
+prevdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx7/NMZ.status`
 
 # Update some documents. Add `xyzzy' to each document.
 cd $TMPDATA
@@ -32,11 +33,11 @@
 cd ../
 
 # Update the index.
-cd ../scripts 
-./mknmz --update=../tests/idx7 >> $LOG
+
+../scripts/mknmz --update=idx7 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
 
-postdocnum=`perl -lne 'print $1 if /^files (\d+)/' ../tests/idx7/NMZ.status`
+postdocnum=`perl -lne 'print $1 if /^files (\d+)/' idx7/NMZ.status`
 
 echo "predocnum:" $prevdocnum, "postdocnum:" $postdocnum >> $LOG
 test $prevdocnum != $postdocnum && exit 1  # error if prev != post
Index: namazu/tests/mknmz-6
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-6,v
retrieving revision 1.1
diff -u -r1.1 mknmz-6
--- namazu/tests/mknmz-6	2000/03/12 06:14:15	1.1
+++ namazu/tests/mknmz-6	2001/09/14 01:04:28
@@ -3,7 +3,8 @@
 # Make an index for testing query operations.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/query
+TARGET=$srcdir/data/query
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx8; then
     mkdir idx8
@@ -12,6 +13,5 @@
 fi
 
 # Simple indexing.
-cd ../scripts 
-./mknmz -O ../tests/idx8 $TARGET >> $LOG
+../scripts/mknmz -O idx8 $TARGET >> $LOG
 exit $?
Index: namazu/tests/mknmz-7
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-7,v
retrieving revision 1.2
diff -u -r1.2 mknmz-7
--- namazu/tests/mknmz-7	2000/04/26 02:30:52	1.2
+++ namazu/tests/mknmz-7	2001/09/14 01:04:28
@@ -3,7 +3,8 @@
 # Test for mknmz's --html-split option.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/html-split
+TARGET=$srcdir/data/html-split
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx9; then
     mkdir idx9
@@ -12,7 +13,7 @@
 fi
 
 # Indexing with --html-split option.
-cd ../scripts 
-./mknmz --html-split -O ../tests/idx9 $TARGET >> $LOG
+
+../scripts/mknmz --html-split -O idx9 $TARGET >> $LOG
 exit $?
 
Index: namazu/tests/mknmz-8
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-8,v
retrieving revision 1.2
diff -u -r1.2 mknmz-8
--- namazu/tests/mknmz-8	2000/04/26 03:18:05	1.2
+++ namazu/tests/mknmz-8	2001/09/14 01:04:28
@@ -3,7 +3,8 @@
 # Test for mknmz's --html-split option with updating.
 #
 LOG=`pwd`/test-log
-TARGET=`pwd`/data/html-split
+TARGET=$srcdir/data/html-split
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx10; then
     mkdir idx10
@@ -19,40 +20,36 @@
 cp -rp $TARGET tmp-data
 
 # Index with --html-split option.
-cd ../scripts 
-./mknmz --html-split -O ../tests/idx10 $TMPDATA >> $LOG
+../scripts/mknmz --html-split -O idx10 $TMPDATA >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-origdocnum=`./gtnmz ../tests/idx10/NMZ.r`
+origdocnum=`../scripts/gtnmz idx10/NMZ.r`
 
 # Update 1.html.
 perl -i -pe s/xyzzy// $TMPDATA/1.html
 echo amarok >> $TMPDATA/1.html
 
 # Update the index with --html-split option.
-cd ../scripts 
-./mknmz --update=../tests/idx10 >> $LOG
+../scripts/mknmz --update=idx10 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-docnum=`./gtnmz ../tests/idx10/NMZ.r`
+docnum=`../scripts/gtnmz idx10/NMZ.r`
 test $docnum != $origdocnum && exit 1  # error if not equal
 
 # Remove 2.html.
 rm $TMPDATA/2.html
 
 # Update the index with --html-split option.
-cd ../scripts 
-./mknmz --update=../tests/idx10 >> $LOG
+../scripts//mknmz --update=idx10 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-docnum=`./gtnmz ../tests/idx10/NMZ.r`
+docnum=`../scripts/gtnmz idx10/NMZ.r`
 docnum2=`expr $docnum + $docnum`
 test $docnum2 != $origdocnum && exit 1  # error if not equal
 
 # Nothing changed.
 
 # Update the index with --html-split option.
-cd ../scripts 
-./mknmz --update=../tests/idx10 >> $LOG
+../scripts/mknmz --update=idx10 >> $LOG
 test "$?" != "0" && exit 1  # error if not success
-docnum=`./gtnmz ../tests/idx10/NMZ.r`
+docnum=`../scripts/gtnmz idx10/NMZ.r`
 docnum2=`expr $docnum + $docnum`
 test $docnum2 != $origdocnum && exit 1  # error if not equal
 
Index: namazu/tests/mknmz-9
===================================================================
RCS file: /storage/cvsroot/namazu/tests/mknmz-9,v
retrieving revision 1.3
diff -u -r1.3 mknmz-9
--- namazu/tests/mknmz-9	2000/09/18 10:45:08	1.3
+++ namazu/tests/mknmz-9	2001/09/14 01:04:28
@@ -4,7 +4,8 @@
 #
 
 LOG=`pwd`/test-log
-TARGET=`./select-data`
+TARGET=`$srcdir/select-data`
+echo '  *** starting ' $0 >>$LOG
 
 if test ! -d idx11; then
     mkdir idx11
@@ -12,18 +13,17 @@
     rm -f idx11/NMZ.*
 fi
 
-cd ../scripts
-./mknmz -O ../tests/idx11 $TARGET >> $LOG 2>&1 &
+../scripts/mknmz -O idx11 $TARGET >> $LOG 2>&1 &
 
 i=20
 while test $i -gt 0
 do {
     i=`expr $i - 1`
-    if test -r ../tests/idx11/NMZ.lock2
+    if test -r idx11/NMZ.lock2
     then {
-        kill -TERM `cat ../tests/idx11/NMZ.lock2`
+        kill -TERM `cat idx11/NMZ.lock2`
         wait
-        grep '^\[Base\]' ../tests/idx11/NMZ.log >> $LOG && exit 0
+        grep '^\[Base\]' idx11/NMZ.log >> $LOG && exit 0
         exit 1
     }
     fi
Index: namazu/tests/namazu-1
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-1,v
retrieving revision 1.3
diff -u -r1.3 namazu-1
--- namazu/tests/namazu-1	2000/02/27 07:42:04	1.3
+++ namazu/tests/namazu-1	2001/09/14 01:04:29
@@ -3,6 +3,7 @@
 # Test for namazu.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 docnum=`perl -lne 'print $1 if /^files (\d+)/' idx1/NMZ.status`
 
Index: namazu/tests/namazu-10
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-10,v
retrieving revision 1.1
diff -u -r1.1 namazu-10
--- namazu/tests/namazu-10	2000/12/20 10:09:21	1.1
+++ namazu/tests/namazu-10	2001/09/14 01:04:29
@@ -4,6 +4,7 @@
 #
 LOG=`pwd`/test-log
 IDX=`pwd`/idx8
+echo '  *** starting ' $0 >>$LOG
 
 MSG='The index should be old format.'
 
Index: namazu/tests/namazu-11
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-11,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 namazu-11
--- namazu/tests/namazu-11	2001/07/10 02:13:42	1.1.2.1
+++ namazu/tests/namazu-11	2001/09/14 01:04:29
@@ -4,6 +4,7 @@
 #
 LOG=`pwd`/test-log
 IDX=`pwd`/idx17
+echo '  *** starting ' $0 >>$LOG
 
 # To make messages English
 LANG= ; export LANG
Index: namazu/tests/namazu-2
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-2,v
retrieving revision 1.3
diff -u -r1.3 namazu-2
--- namazu/tests/namazu-2	2000/02/27 07:42:04	1.3
+++ namazu/tests/namazu-2	2001/09/14 01:04:29
@@ -3,6 +3,7 @@
 # Test for namazu. Two indices are searched at once.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 docnum=`perl -lne 'print $1 if /^files (\d+)/' "idx1/NMZ.status"`
 docnum=`expr $docnum + $docnum`
Index: namazu/tests/namazu-3
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-3,v
retrieving revision 1.2
diff -u -r1.2 namazu-3
--- namazu/tests/namazu-3	2000/02/27 07:42:04	1.2
+++ namazu/tests/namazu-3	2001/09/14 01:04:29
@@ -3,6 +3,7 @@
 # Test for namazu. Searching an index having deleted documents.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 docnum=`perl -lne 'print $1 if /^files (\d+)/' idx4/NMZ.status`
 
Index: namazu/tests/namazu-4
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-4,v
retrieving revision 1.1
diff -u -r1.1 namazu-4
--- namazu/tests/namazu-4	2000/02/27 07:45:51	1.1
+++ namazu/tests/namazu-4	2001/09/14 01:04:29
@@ -3,6 +3,7 @@
 # Test for namazu.  Searching an index having updated documents.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 docnum=`perl -lne 'print $1 if /^Updated Documents:\s+(\d+)/' idx7/NMZ.log`
 
Index: namazu/tests/namazu-5
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-5,v
retrieving revision 1.2
diff -u -r1.2 namazu-5
--- namazu/tests/namazu-5	2000/04/05 07:07:56	1.2
+++ namazu/tests/namazu-5	2001/09/14 01:04:29
@@ -3,6 +3,7 @@
 # Test for namazu. Attack namazu with nasty cases.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 docnum=`perl -lne 'print $1 if /^files (\d+)/' idx1/NMZ.status`
 
 cd ../src
Index: namazu/tests/namazu-6
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-6,v
retrieving revision 1.1
diff -u -r1.1 namazu-6
--- namazu/tests/namazu-6	2000/03/12 06:16:25	1.1
+++ namazu/tests/namazu-6	2001/09/14 01:04:29
@@ -5,6 +5,7 @@
 LOG=`pwd`/test-log
 IDX=`pwd`/idx8
 TMP=`pwd`/tmp
+echo '  *** starting ' $0 >>$LOG
 
 cd ../src
 
@@ -19,7 +20,7 @@
 M123="$TMP.123"    # 1.txt and 2.txt 3.txt
 
 cat /dev/null > $M0
-head -1 $IDX/NMZ.r > $M1
+head -1  $IDX/NMZ.r > $M1
 head -2  $IDX/NMZ.r | tail -1 > $M2
 head -3  $IDX/NMZ.r | tail -1 > $M3
 
Index: namazu/tests/namazu-7
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-7,v
retrieving revision 1.2
diff -u -r1.2 namazu-7
--- namazu/tests/namazu-7	2000/04/26 02:30:52	1.2
+++ namazu/tests/namazu-7	2001/09/14 01:04:29
@@ -3,6 +3,7 @@
 # Test for namazu.  Searching an index created with --html-split option.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 docnum=`perl -lne 'print $1 if /^files (\d+)/' idx9/NMZ.status`
 
Index: namazu/tests/namazu-8
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-8,v
retrieving revision 1.1
diff -u -r1.1 namazu-8
--- namazu/tests/namazu-8	2000/04/26 02:30:52	1.1
+++ namazu/tests/namazu-8	2001/09/14 01:04:29
@@ -3,6 +3,7 @@
 # Test for namazu.  Searching an updated index created with --html-split.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 # `amarok' should be found.
 cd ../src
Index: namazu/tests/namazu-9
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-9,v
retrieving revision 1.3
diff -u -r1.3 namazu-9
--- namazu/tests/namazu-9	2000/10/23 05:58:00	1.3
+++ namazu/tests/namazu-9	2001/09/14 01:04:30
@@ -5,6 +5,7 @@
 LOG=`pwd`/test-log
 TMP=`pwd`/tmp
 IDX=`pwd`/idx8
+echo '  *** starting ' $0 >>$LOG
 
 MSG1='Too many documents hit. Ignored'
 MSG2='Too many words matched. Ignored'
Index: namazu/tests/namazu-cgi-1
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-cgi-1,v
retrieving revision 1.5
diff -u -r1.5 namazu-cgi-1
--- namazu/tests/namazu-cgi-1	2000/04/07 02:15:52	1.5
+++ namazu/tests/namazu-cgi-1	2001/09/14 01:04:30
@@ -3,6 +3,7 @@
 # Test for namazu.cgi.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 docnum=`perl -lne 'print $1 if /^files (\d+)/' "idx1/NMZ.status"`
 
Index: namazu/tests/namazu-cgi-2
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-cgi-2,v
retrieving revision 1.6
diff -u -r1.6 namazu-cgi-2
--- namazu/tests/namazu-cgi-2	2000/04/07 02:15:52	1.6
+++ namazu/tests/namazu-cgi-2	2001/09/14 01:04:30
@@ -3,6 +3,7 @@
 # Test for namazu.cgi. Two indices are searched at once.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 docnum=`perl -lne 'print $1 if /^files (\d+)/' "idx1/NMZ.status"`
 docnum=`expr $docnum + $docnum`
Index: namazu/tests/namazu-cgi-3
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-cgi-3,v
retrieving revision 1.2
diff -u -r1.2 namazu-cgi-3
--- namazu/tests/namazu-cgi-3	2000/04/07 02:15:52	1.2
+++ namazu/tests/namazu-cgi-3	2001/09/14 01:04:30
@@ -5,8 +5,8 @@
 # They should be escaped not printed in unescaped.
 #
 LOG=`pwd`/test-log
-
 pwd=`pwd`
+echo '  *** starting ' $0 >>$LOG
 
 tmprc="$pwd/../src/.namazurc"
 echo "Index $pwd" > $tmprc
Index: namazu/tests/namazu-cgi-4
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-cgi-4,v
retrieving revision 1.3.8.1
diff -u -r1.3.8.1 namazu-cgi-4
--- namazu/tests/namazu-cgi-4	2001/08/20 13:32:24	1.3.8.1
+++ namazu/tests/namazu-cgi-4	2001/09/14 01:04:30
@@ -5,6 +5,7 @@
 # NOTE: If error occurred, consult idx1/NMZ.access.
 #
 LOG=`pwd`/test-log
+echo '  *** starting ' $0 >>$LOG
 
 pwd=`pwd`
 
Index: namazu/tests/namazu-cgi-5
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-cgi-5,v
retrieving revision 1.1
diff -u -r1.1 namazu-cgi-5
--- namazu/tests/namazu-cgi-5	2000/12/25 10:08:43	1.1
+++ namazu/tests/namazu-cgi-5	2001/09/14 01:04:30
@@ -3,7 +3,7 @@
 # Test for namazu.cgi with "ContentType" directive.
 #
 LOG=`pwd`/test-log
-
+echo '  *** starting ' $0 >>$LOG
 pwd=`pwd`
 
 tmprc=".namazurc"
Index: namazu/tests/namazu-cgi-6
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-cgi-6,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 namazu-cgi-6
--- namazu/tests/namazu-cgi-6	2001/07/04 09:58:07	1.1.2.2
+++ namazu/tests/namazu-cgi-6	2001/09/14 01:04:30
@@ -3,7 +3,7 @@
 # Test for idxname CGI paramater
 #
 LOG=`pwd`/test-log
-
+echo '  *** starting ' $0 >>$LOG
 pwd=`pwd`
 tmprc=".namazurc"
 echo "Index $pwd/idx16" > $tmprc
Index: namazu/tests/namazu-cgi-7
===================================================================
RCS file: /storage/cvsroot/namazu/tests/namazu-cgi-7,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 namazu-cgi-7
--- namazu/tests/namazu-cgi-7	2001/07/31 07:16:11	1.1.2.1
+++ namazu/tests/namazu-cgi-7	2001/09/14 01:04:30
@@ -3,7 +3,7 @@
 # Test for DOCUMENT_NAME variable
 #
 LOG=`pwd`/test-log
-
+echo '  *** starting ' $0 >>$LOG
 pwd=`pwd`
 tmprc=".namazurc"
 echo "Index $pwd/idx19" > $tmprc
Index: namazu/tests/select-data
===================================================================
RCS file: /storage/cvsroot/namazu/tests/select-data,v
retrieving revision 1.1.8.1
diff -u -r1.1.8.1 select-data
--- namazu/tests/select-data	2001/07/07 07:53:27	1.1.8.1
+++ namazu/tests/select-data	2001/09/14 01:04:31
@@ -4,6 +4,7 @@
 #
 
 base=`pwd`/data
+base=$srcdir/data
 
 for lang in "$LC_ALL" "$LC_CTYPE" "$LANG"; do
     cand=`echo "$lang" | perl -nle 'print $1 if /^(..)/'`