From f32bd7111f7b2f3c890cb3119bc31be8e217a874 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 20 May 2011 11:32:55 +0000 Subject: [PATCH] the "we have the time but not the people" way of regression testing --- contrib/revisionary.sh | 98 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100755 contrib/revisionary.sh diff --git a/contrib/revisionary.sh b/contrib/revisionary.sh new file mode 100755 index 000000000..5778cf148 --- /dev/null +++ b/contrib/revisionary.sh @@ -0,0 +1,98 @@ +#!/usr/local/bin/bash + +STARTREVISION=14033 +ENDREVISION=15268 +CURRENTREVISION=$STARTREVISION +HOME_DIR='/home/gnunet/FreeBSD7-AMD64-wachs/freebsd7-amd64-wachs/build' + + +CMD_UPDATE="svn up --force --accept theirs-full -r" +CMD_CLEANUP="killall -s 31 -r gnunet-*; make distclean;" +CMD_PREPARATION="./bootstrap; ./configure --prefix=/tmp/gnb --with-extractor=/usr/local" +CMD_BUILD="make all" +CMD_TEST="cd src/transport ; make test_transport_api_tcp; ./test_transport_api_tcp" + +#LOGGING="" +LOGGING=" 1> /dev/null 2> errors.txt" +LOGFILE="log.txt" + +function output () +{ + eval echo $1 + eval echo $1 >> $LOGFILE +} + + +while [ $CURRENTREVISION -le $ENDREVISION ]; do + output 'Testing revision $CURRENTREVISION' +# updating + output ' -> updating ' + eval cd $HOME_DIR + CMD="$CMD_UPDATE $CURRENTREVISION $LOGGING" + eval $CMD + result=$? + if [ $result -eq 0 ]; then + output " updating OK" + else + output " updating FAILED" + (( CURRENTREVISION++ )) + continue + fi + +# clean up + output " -> cleanup " + CMD="$CMD_CLEANUP $LOGGING" + eval $CMD + result=$? + if [ $result -eq 0 ]; then + output " cleanup OK" + else + output " cleanup FAILED" + (( CURRENTREVISION++ )) + continue + fi +# preparing + output " -> preparation " + CMD="$CMD_PREPARATION $LOGGING" + #echo $CMD + eval $CMD + result=$? + if [ $result -eq 0 ]; then + output " preparation OK" + else + output " preparation FAILED" + (( CURRENTREVISION++ )) + continue + fi +# building + output " -> building " + CMD="$CMD_BUILD $LOGGING" + #echo $CMD + eval $CMD + result=$? + if [ $result -eq 0 ]; then + output " building OK" + else + output " building FAILED" + (( CURRENTREVISION++ )) + continue + fi +# testing + output " -> testing " + CMD="$CMD_TEST $LOGGING" + #echo $CMD + eval $CMD + result=$? + testresult=result + if [ $result -eq 0 ]; then + output " testing OK" + else + output " testing FAILED" + output 'Revision $CURRENTREVISION FAILED' + fi + (( CURRENTREVISION++ )) +done + +exit + + -- 2.25.1