2013-01-18 18:12:00 +04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
|
|
|
|
# See the file 'doc/COPYING' for copying permission
|
|
|
|
|
|
|
|
SQLMAP_HOME="/opt/sqlmap"
|
|
|
|
REGRESSION_SCRIPT="${SQLMAP_HOME}/extra/shutils"
|
|
|
|
|
2013-01-19 20:25:41 +04:00
|
|
|
FROM="regressiontest@sqlmap.org"
|
|
|
|
TO="bernardo.damele@gmail.com, miroslav.stampar@gmail.com"
|
|
|
|
SUBJECT="Automated regression test failed on $(date)"
|
|
|
|
|
2013-01-18 18:12:00 +04:00
|
|
|
cd $SQLMAP_HOME
|
|
|
|
git pull
|
|
|
|
rm -f output 2>/dev/null
|
|
|
|
|
|
|
|
cd $REGRESSION_SCRIPT
|
2013-01-20 05:07:00 +04:00
|
|
|
echo "Regression test started at $(date)" 1>/tmp/regressiontest.log 2>&1
|
|
|
|
python regressiontest.py 1>>/tmp/regressiontest.log 2>&1
|
2013-01-19 20:25:41 +04:00
|
|
|
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
2013-01-23 04:18:29 +04:00
|
|
|
echo "Regression test finished at $(date)" 1>>/tmp/regressiontest.log 2>&1
|
2013-01-19 20:25:41 +04:00
|
|
|
cat /tmp/regressiontest.log | mailx -s "${SUBJECT}" -aFrom:${FROM} ${TO}
|
2013-01-23 04:18:29 +04:00
|
|
|
else
|
|
|
|
echo "Regression test finished at $(date)" 1>>/tmp/regressiontest.log 2>&1
|
2013-01-19 20:25:41 +04:00
|
|
|
fi
|