X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fcommon.sh.in;h=aa34927091e0d928cdaca9095427f6f50ce55833;hb=b3c37ca5f7bd503f07787e1ac87c1af2ab37f5ba;hp=58297f099ccc6a243d5f0faf4c7b50020c6f27e0;hpb=8f75811e49388577186fc634e931edc1834b59c9;p=mmh diff --git a/test/common.sh.in b/test/common.sh.in index 58297f0..aa34927 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -14,11 +14,15 @@ test -z "$bindir" && bindir="@bindir@" test -z "$mandir" && mandir="@mandir@" test -z "$sysconfdir" && sysconfdir="@sysconfdir@" test -z "$pagerpath" && pagerpath="@pagerpath@" +test -z "$MULTIBYTE_ENABLED" && MULTIBYTE_ENABLED="@MULTIBYTE_ENABLED@" export MH_TEST_DIR auxexecdir bindir mandir sysconfdir pagerpath +export MULTIBYTE_ENABLED test -z "$MH_INST_DIR" && MH_INST_DIR=${MH_TEST_DIR}/inst export MH_INST_DIR +unset MHBUILD MHCONTEXT MHMTSUSERCONF MHN MHSHOW MHSTORE MHTMPDIR +unset MHLDEBUG MHPDEBUG MHWDEBUG MM_CHARSET output_md5() { @@ -68,7 +72,7 @@ findprog() require_prog () { - if [ -z `findprog $1` ]; then + if [ -z "`findprog $1`" ]; then test_skip "missing $1" fi } @@ -133,7 +137,7 @@ setup_test () MHMTSCONF=${MH_INST_DIR}${sysconfdir}/mts.conf PATH=${MH_INST_DIR}${bindir}:${PATH} MH_LIB_DIR=${MH_INST_DIR}${auxexecdir} - export MH MHMTSCONF MH_LIB_DIR + export MH MHMTSCONF MH_LIB_DIR PATH # # Only install once @@ -141,16 +145,26 @@ setup_test () if [ -d ${MH_INST_DIR}${bindir} ]; then : else - (cd ${MH_OBJ_DIR} && make DESTDIR=${MH_INST_DIR} install) || exit 1 + (cd ${MH_OBJ_DIR} && make DESTDIR=${MH_INST_DIR} SETGID_MAIL= install) || + exit 1 + + #### Don't test with sendmail because it would really send the + #### mail. If configured to use sendmail, change to smtp instead + #### so that we use fakesmtp. + sed -e 's/mts: *sendmail/mts: smtp/' ${MHMTSCONF} >${MHMTSCONF}.new + mv -f ${MHMTSCONF}.new ${MHMTSCONF} fi # clean old test data - trap "rm -rf $MH_TEST_DIR/Mail; exit \$status" 0 + trap "rm -rf $MH_TEST_DIR/Mail" 0 # setup test data mkdir $MH_TEST_DIR/Mail || exit 1 cat > $MH <