[Fedora-directory-commits] dsgw/tests setup.sh,1.1,1.2

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Feb 7 22:46:58 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/dsgw/tests
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15072

Modified Files:
	setup.sh 
Log Message:
added a lot of tests


Index: setup.sh
===================================================================
RCS file: /cvs/dirsec/dsgw/tests/setup.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- setup.sh	16 Jan 2008 22:56:03 -0000	1.1
+++ setup.sh	7 Feb 2008 22:46:56 -0000	1.2
@@ -9,7 +9,7 @@
 adminpw=admin
 #needinstance=1
 #needdata=1
-usessl=1
+#usessl=1
 PATH=/usr/lib64/mozldap:/usr/lib/mozldap:$PATH
 export PATH
 suffix="dc=example,dc=com"
@@ -97,15 +97,19 @@
 SIEPWD: $adminpw
 EOF
 
-VGPREFIX="valgrind --tool=memcheck --leak-check=yes --suppressions=$HOME/valgrind.supp --num-callers=40 "
+#VGPREFIX="valgrind --tool=memcheck --leak-check=yes --suppressions=$HOME/valgrind.supp --num-callers=40 --suppressions=$testdir/valgrind.supp "
+# These are CGI programs - they assume they will run for a very short period of time - they use exit() instead of free() :P
+VGPREFIX="valgrind --tool=memcheck --leak-check=no --suppressions=$HOME/valgrind.supp --num-callers=40 --suppressions=$testdir/valgrind.supp "
 GDB="gdb -x .gdbinit "
 DEBUGCMD=VALGRIND
 #DEBUGCMD="$GDB"
 
-PROGS="lang"
+PROGS="edit"
 
 # use scripts for orgchart perl scripts
 SCRIPTS=""
+#ClientLanguage=en_US ; export ClientLanguage
+HTTP_ACCEPT_LANGUAGE=en_US ; export HTTP_ACCEPT_LANGUAGE
 
 runATest() {
     prog="$1"
@@ -118,7 +122,6 @@
     shift
     variant="$1"
 
-    set -x
     if [ ! -d results/$prog ] ; then mkdir -p results/$prog ; fi
     basetest=`basename $mytest`$varnum
     echo "Running test $mytest$varnum . . ."
@@ -135,19 +138,30 @@
 	QUERY_STRING="`cat $mytest`" ; export QUERY_STRING
     else
 	CONTENT_LENGTH=`wc -c $mytest | cut -f1 -d' '` ; export CONTENT_LENGTH
+        CONTENT_TYPE=application/x-www-form-urlencoded ; export CONTENT_TYPE
     fi
     SCRIPT_NAME=/clients/dsgw/bin/$prog ; export SCRIPT_NAME
 
     exec 4<$pwpfile
     PASSWORD_PIPE=4 ; export PASSWORD_PIPE
     if [ -n "$DEBUGCMD" -a "$DEBUGCMD" = "$GDB" ] ; then
-	echo "break main" > .gdbinit
+        if [ -f /tmp/$prog.debug.$basetest ] ; then
+            echo "break main" > .gdbinit
+        else
+            rm -f .gdbinit
+        fi
 	if [ $type = "POST" ] ; then
 	    echo "run < $mytest > results/$prog/$basetest.html" >> .gdbinit
 	else
 	    echo "run > results/$prog/$basetest.html" >> .gdbinit
 	fi
+        if [ ! -f /tmp/$prog.debug.$basetest ] ; then
+            echo "quit" >> .gdbinit
+        fi
 	./libtool --mode execute $GDB ./$prog
+        if [ -f /tmp/$prog.debug.$basetest ] ; then
+            exit 1
+        fi
     elif [ "$DEBUGCMD" = "VALGRIND" ] ; then
 	VALGRIND="$VGPREFIX --log-file-exactly=results/$prog/$basetest.vg"
 	if [ $type = "POST" ] ; then
@@ -168,7 +182,6 @@
     if [ -n "$testtmpfile" -a -f "$testtmpfile" ] ; then
 	rm -f "$testtmpfile"
     fi
-    set +x
 }
 
 runGetTestsForProg() {




More information about the Fedora-directory-commits mailing list