X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=test%2Fsetup-test;h=ffd9e644633424c5c479ec85123c5caabcae1c4b;hp=d197295292595077a9215e17460f07a5997968e1;hb=b6823062c9806496b39ff12bf1fbe43ae127c96c;hpb=031871c2ede845956070da603e8494690f7beb70 diff --git a/test/setup-test b/test/setup-test index d197295..ffd9e64 100755 --- a/test/setup-test +++ b/test/setup-test @@ -1,30 +1,26 @@ #!/bin/sh -TEMPDIR=`mktemp -d /tmp/nmh-test-XXXXXXXX` -echo $TEMPDIR > test-temp-dir +set -e -pushd .. -aclocal -autoheader -autoconf -./configure --prefix=$TEMPDIR --with-locking=fcntl -make install +if TEMPDIR="`cat test-temp-dir 2>/dev/null`" \ + && [ -f "$TEMPDIR/build/Makefile" ]; then + (cd "$TEMPDIR/build" && make all install) + exit +fi -echo "Path: $TEMPDIR/Mail" > $TEMPDIR/mh_profile -mkdir $TEMPDIR/Mail +TEMPDIR="`mktemp -d /tmp/mmh-test-XXXXXXXX`" +echo "$TEMPDIR" >test-temp-dir -MH=$TEMPDIR/mh_profile $TEMPDIR/bin/folder -create +inbox +cd .. +srcdir="$PWD" +if [ ! -f configure ]; then + ./autogen.sh +fi +if [ -f Makefile ]; then + make -s clean +fi -for i in `seq 1 10`; -do - cat > $TEMPDIR/Mail/inbox/$i < -To: Some User -Date: Fri, 29 Sep 2006 00:00:00 -Subject: Testing message $i - -This is message number $i -EOF -done - -popd +mkdir "$TEMPDIR/build" +cd "$TEMPDIR/build" +"$srcdir/configure" -q --prefix="$TEMPDIR" --enable-debug +make -s all install