s3-selftest: fix testparm tests as non-root.
[amitay/samba.git] / source3 / script / tests / test_testparm_s3.sh
index f1316e922c2eb61a3ecd759b40b1517eb399a4ee..b9e4b810cf0a74569d7f55afb85796e9151c52d3 100755 (executable)
@@ -5,11 +5,13 @@
 # The main purpose (for now) is to test all the special handlers
 # and the macro expansions.
 
-TEMP_CONFFILE=${LIBDIR}/smb.conf.tmp
-TESTPARM="$VALGRIND ${TESTPARM:-$BINDIR/testparm} --suppress-prompt"
+TEMP_CONFFILE=${LOCAL_PATH}/smb.conf.tmp
+TESTPARM="$VALGRIND ${TESTPARM:-$BINDIR/testparm} --suppress-prompt --skip-logic-checks"
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 failed=0
 
@@ -26,7 +28,7 @@ EOF
 
 test_one_global_option()
 {
-       OPTION=$1
+       OPTION="$@"
        rm -f ${TEMP_CONFFILE}
        cat > ${TEMP_CONFFILE}<<EOF
 [global]