svn commit: samba r17540 - in branches/SAMBA_4_0/source/script/tests: .

metze at samba.org metze at samba.org
Mon Aug 14 16:35:56 GMT 2006


Author: metze
Date: 2006-08-14 16:35:56 +0000 (Mon, 14 Aug 2006)
New Revision: 17540

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17540

Log:
store command line args of selftest.sh in local vars
as $0,$1,$2,$3 may change in side the script 
or included scripts.

This fixes the usage of SOCKET_WRAPPER on non linux
systems (tested on IRIX 6.4)

metze
Modified:
   branches/SAMBA_4_0/source/script/tests/selftest.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh	2006-08-14 14:56:21 UTC (rev 17539)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh	2006-08-14 16:35:56 UTC (rev 17540)
@@ -7,17 +7,22 @@
 	exit
 fi
 
+ARG0=$0
+ARG1=$1
+ARG2=$2
+ARG3=$3
+
 if [ -z "$TORTURE_MAXTIME" ]; then
     TORTURE_MAXTIME=600
 fi
 
 OLD_PWD=`pwd`
-PREFIX=$1
+PREFIX=$ARG1
 PREFIX=`echo $PREFIX | sed s+//+/+`
 export PREFIX
 
 # allow selection of the test lists
-TESTS=$2
+TESTS=$ARG2
 
 if [ $TESTS = "all" ]; then
     TLS_ENABLED="yes"
@@ -29,7 +34,7 @@
 LD_LIBRARY_PATH=$OLD_PWD/bin:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
 
-incdir=`dirname $0`
+incdir=`dirname $ARG0`
 echo -n "PROVISIONING..."
 . $incdir/mktestsetup.sh $PREFIX || exit 1
 echo "DONE"
@@ -37,14 +42,16 @@
 PATH=bin:$PATH
 export PATH
 
-DO_SOCKET_WRAPPER=$3
+DO_SOCKET_WRAPPER=$ARG3
 if [ x"$DO_SOCKET_WRAPPER" = x"SOCKET_WRAPPER" ];then
 	SOCKET_WRAPPER_DIR="$PREFIX/sw"
 	export SOCKET_WRAPPER_DIR
 	echo "SOCKET_WRAPPER_DIR=$SOCKET_WRAPPER_DIR"
+else
+	echo "NOT USING SOCKET_WRAPPER"
 fi
 
-incdir=`dirname $0`
+incdir=`dirname $ARG0`
 . $incdir/test_functions.sh
 
 SMBD_TEST_FIFO="$PREFIX/smbd_test.fifo"
@@ -94,8 +101,8 @@
 kill `cat $PIDDIR/smbd.pid`
 
 END=`date`
-echo "START: $START ($0)";
-echo "END:   $END ($0)";
+echo "START: $START ($ARG0)";
+echo "END:   $END ($ARG0)";
 
 # if there were any valgrind failures, show them
 count=`find $PREFIX -name 'valgrind.log*' | wc -l`
@@ -109,4 +116,4 @@
     done
 fi
 
-teststatus $0 $failed
+teststatus $ARG0 $failed



More information about the samba-cvs mailing list