Switch to side-by-side view

--- a/tests/shared.sh
+++ b/tests/shared.sh
@@ -1,10 +1,12 @@
 # @(#$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_TESTDATA=/home/dockes/projets/fulltext/testrecoll
+RECOLL_TESTDATA=/Users/dockes/projets/fulltext/testrecoll
 
-RECOLL_CONFDIR=${RECOLL_TESTDATA}/config
+RECOLL_CONFDIR=/Users/dockes/projets/fulltext/recoll/tests/config
 export RECOLL_CONFDIR
+
+ECHON="/bin/echo -n"
 
 # Call this with the script's $0 as argument
 initvariables() {
@@ -14,6 +16,30 @@
   mystderr=$toptmp/${myname}.err
   mystdout=$toptmp/${myname}.out
   mydiffs=$toptmp/${myname}.diffs
+}
+
+rerootResults()
+{
+    savedcd=`pwd`
+    dirs=`ls -F | grep / | grep -v CVS | grep -v non-auto | grep -v config`
+    for dir in $dirs ; do
+    	cd $dir
+	resfile=`basename $dir`.txt
+	sed -i.bak \
+	  -e "s!file:///.*/testrecoll/!file://$RECOLL_TESTDATA/!g" \
+	  $resfile
+    	cd ..
+    done
+
+    cd $RECOLL_CONFDIR
+    sed -i.bak \
+  -e "s!/.*/testrecoll/!$RECOLL_TESTDATA/!g" \
+      recoll.conf
+    sed -i.bak \
+  -e "s!/.*/testrecoll/!$RECOLL_TESTDATA/!g" \
+      mimemap
+
+    cd $savedcd
 }
 
 fatal () {