From b703332324f04c1f99ad1b4df29283cffc02a85a Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 16 Apr 2010 15:54:48 +0200 Subject: [PATCH] make tests easier to run and interpret --- tests/ooff/ooff.txt | 2 +- tests/runtests.sh | 16 ++++++++++++++-- tests/shared.sh | 4 +++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/ooff/ooff.txt b/tests/ooff/ooff.txt index 0697e7c2..d121329c 100644 --- a/tests/ooff/ooff.txt +++ b/tests/ooff/ooff.txt @@ -1,2 +1,2 @@ 1 results -application/vnd.sun.xml.writer [file:///home/dockes/projets/fulltext/testrecoll/ooff/writer.odt] [Ceci est le titre du document openoffice élément <> "toto"] 6637 bytes +application/vnd.sun.xml.writer [file:///home/dockes/projets/fulltext/testrecoll/ooff/writer.odt] [Ceci est le titre du document openoffice élément <> "toto"] 8296 bytes diff --git a/tests/runtests.sh b/tests/runtests.sh index 20e17061..889f5207 100644 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -7,7 +7,14 @@ fi . shared.sh -recollindex -z +makeindex() { + echo "Zeroing Index" + rm -rf $RECOLL_CONFDIR/xapiandb $RECOLL_CONFDIR/aspdict.*.rws + echo "Indexing" + recollindex -z +} + +makeindex # Yes, we could/should use the $toptmp from shared.sh here, but what if # this is unset ? @@ -20,8 +27,13 @@ fi dirs=`ls -F | grep / | grep -v CVS` +echo +echo "Running query tests:" + for dir in $dirs ; do - cd $dir && echo $dir + cd $dir && echo -n "$dir " sh `basename $dir`.sh cd .. done + +echo diff --git a/tests/shared.sh b/tests/shared.sh index 158e0657..d11ec4af 100644 --- a/tests/shared.sh +++ b/tests/shared.sh @@ -16,13 +16,15 @@ initvariables() { } fatal () { + set -f + echo echo $* exit 1 } checkresult() { if test -s "$mydiffs" ; then - fatal $myname FAILED + fatal '*** ' $myname FAILED else rm -f $mydiffs exit 0