summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-08-14 16:35:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:35 -0500
commit879ce60b7377f8b50eb6ead565fdab2a41772df8 (patch)
treeec16b07e551338350f6052b858a532f527bb2ede
parent1935ef0d5446bf372ee570ee20da703eaab65718 (diff)
downloadsamba-879ce60b7377f8b50eb6ead565fdab2a41772df8.tar.gz
samba-879ce60b7377f8b50eb6ead565fdab2a41772df8.tar.bz2
samba-879ce60b7377f8b50eb6ead565fdab2a41772df8.zip
r17540: 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 (This used to be commit ebfb719e3d048383c04e5d665b23d7fcb4e48fb4)
-rwxr-xr-xsource4/script/tests/selftest.sh23
1 files changed, 15 insertions, 8 deletions
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index 7fcf1f3101..67e3cf65ce 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -7,17 +7,22 @@ then
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 @@ export TLS_ENABLED
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 @@ echo "DONE"
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 @@ failed=$?
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 @@ if [ "$count" != 0 ]; then
done
fi
-teststatus $0 $failed
+teststatus $ARG0 $failed