r19 - / regression_tests regression_tests/bin

erik at minisip.org erik at minisip.org
Mon Oct 16 17:06:10 CEST 2006


Author: erik
Date: 2006-10-16 17:06:09 +0200 (Mon, 16 Oct 2006)
New Revision: 19

Added:
   regression_tests/
   regression_tests/bin/
   regression_tests/bin/regression_test.sh
   regression_tests/tests/
Log:

 * Initial regression test script (probably needs fixing).



Added: regression_tests/bin/regression_test.sh
===================================================================
--- regression_tests/bin/regression_test.sh	2006-10-10 11:47:24 UTC (rev 18)
+++ regression_tests/bin/regression_test.sh	2006-10-16 15:06:09 UTC (rev 19)
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+if test $# -ne 1  ; then echo Usage: $0 revision ; exit 1; fi
+
+REV=$1
+BASE=`pwd`
+PREFIX=${BASE}/usr
+REV=$1
+export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
+export ACLOCAL_FLAGS="-I ${PREFIX}/share/aclocal"
+mkdir -p ${PREFIX}/share/aclocal
+export LD_FLAGS="-L${PREFIX}/lib"
+export CPP_FLAGS="-I${PREFIX}/include"
+
+echo "Regression test:" > $BASE/report.summary 
+echo "(regression test failed)" $BASE/report.subject
+touch $BASE/report.details
+
+svn co -r $REV svn://svn.minisip.org/minisip/trunk || { echo "ERROR Could not download source" >> $BASE/report.summary && exit 1 ; }
+
+# compile without any configure options (other than the prefix)
+cd trunk
+for LIB in libmutil libmcrypto libmnetutil libmstun libmikey libmsip libminisip minisip ; do
+    cd $LIB
+    echo "" >&2
+    echo "AUTOBUILD_INFO: processing ${LIB}..." >&2
+    ./bootstrap && ./configure prefix=$PREFIX && make -j2 && make install || { echo "ERROR: Could not bootstrap/configure/compile/install ${LIB}" >> $BASE/report.summary && exit 1 ; }
+    cd .. 
+done
+
+
+cd $BASE/tests
+
+N_FAIL=0
+
+rm -f $BASE/report.summary $BASE/report.details
+
+for t in `ls -d */` ; do
+	echo Buiding test $t
+	cd $BASE/tests/$t
+	if ./test.sh > testcase_output  ; then
+		echo Result: $?
+		if [ -s $BASE/tests/$t/diff_output ] ; then
+			let N_FAIL=${N_FAIL}+1
+			printf "%40s " $t >> $BASE/report.summary
+			echo "NOT THE EXPECTED OUTPUT" >> $BASE/report.summary
+
+			echo "" >> $BASE/report.details
+			echo "========== $t ===========" >> $BASE/report.details
+			echo "Changes detected:" >> $BASE/report.details
+			cat diff_output >> $BASE/report.details
+			echo "" >> $BASE/report.details ;
+		else 
+			printf "%40s " $t >> $BASE/report.summary
+			echo "ok" >> $BASE/report.summary ;
+		fi
+	else 
+
+		let N_FAIL=${N_FAIL}+1
+
+		printf "%40s " $t >> $BASE/report.summary
+		echo "TEST DID NOT COMPLETE" >> $BASE/report.summary ;
+
+		echo "" >> $BASE/report.details
+		echo "========== $t ===========" >> $BASE/report.details
+		echo build_output >> $BASE/report.details
+		echo "The test did not complete successfully">> $BASE/report.details
+		echo "" >> $BASE/report.details ;
+	fi ; 
+done
+
+printf "%s" "$N_FAIL regression tests failed" > $BASE/report.subject
+
+


Property changes on: regression_tests/bin/regression_test.sh
___________________________________________________________________
Name: svn:executable
   + *



More information about the Minisip-devel mailing list