#!/bin/sh

export APACHE=/opt/apache/bin/httpd
export CVS_RSH=ssh
cvs update -dP >/dev/null 2>&1

perl Makefile.PL --defaultdeps
t/TEST -conf
RESULTS=`find t -name \*.t | xargs tv -q`
if [ $? != 0 ]; then
    SUCCESS="Failure"
    ERROR=`cat t/logs/error_log`
    TESTLOG=`cat tv.log`
else
    SUCCESS="Success"
fi

echo $RESULTS

/var/qmail/bin/sendmail -fmatt@sergeant.org -t <<EOT
To: axkit-dev@xml.apache.org
Subject: Smoke Report: Build $SUCCESS
From: Automated Smoke Reporter <matt@sergeant.org>

This is the automated build report from the AxKit smoke tester

$RESULTS

$TESTLOG

$ERROR
EOT

make realclean
