s3:tests: add a guard arround . $incdir/test_functions.sh
authorStefan Metzmacher <metze@samba.org>
Fri, 30 Jan 2009 12:57:24 +0000 (13:57 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 30 Jan 2009 18:48:00 +0000 (19:48 +0100)
So that caller can overwrite the functions.

metze

source3/script/tests/test_functions.sh
source3/script/tests/test_local_s3.sh
source3/script/tests/test_net_misc.sh
source3/script/tests/test_net_registry.sh
source3/script/tests/test_net_s3.sh
source3/script/tests/test_ntlm_auth_s3.sh
source3/script/tests/test_posix_s3.sh
source3/script/tests/test_smbclient_s3.sh
source3/script/tests/test_smbtorture_s3.sh
source3/script/tests/test_testparm_s3.sh
source3/script/tests/test_wbinfo_s3.sh

index 79642e045b71394669cc72a689f9f3055d6fd57c..bddae18c10ff69107f2e92a3edd4a888bf37c4fc 100644 (file)
@@ -1,3 +1,4 @@
+TEST_FUNCTIONS_SH="INCLUDED"
 
 samba3_stop_sig_term() {
        RET=0
index aed8637abd4d50a30f6f2963ccbead4bb6f1c875..1840779085307cd09b65abb1fe50d3389eda3bca 100755 (executable)
@@ -9,8 +9,10 @@ EOF
 exit 1;
 fi
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 failed=0
 
index 9f5fdfe9251f119e8aa70f6b5427d18ec95e8d73..8d092f4fe1ac76b57c803244331679952f689932 100755 (executable)
@@ -7,8 +7,10 @@ NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
 NETTIME="${NET} time"
 NETLOOKUP="${NET} lookup"
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 failed=0
 
index 22081ec2f617a0d97528085a5a15c0da35548dd0..a3d1a24fd81e3ff496cb482d06a020ba1cb04864 100755 (executable)
@@ -15,8 +15,10 @@ else
        NETREG="${NET} registry"
 fi
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 failed=0
 
index f7dc2b7e10873524d08df7097ab910a5fe9d362f..a0e83a65b1b7b3d8b2c226ce38d48f19dc78c787 100755 (executable)
@@ -2,8 +2,10 @@
 
 # tests for the "net" command
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 failed=0
 
index 6c97f2e6504b8e390e829b4c67f7aecb62afed05..c7ebc03c80878a0f43e2a2898874fce777d32519 100755 (executable)
@@ -1,7 +1,9 @@
 #!/bin/sh
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 failed=0
 
index 3e9998666c4f4f02f71cb3d19f2547abe89af7dc..0885b139bbbbe12bc74a50c41ee4c9272a7abc01 100755 (executable)
@@ -16,8 +16,10 @@ start="$4"
 shift 4
 ADDARGS="$*"
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 base="BASE-ATTR BASE-CHARSET BASE-CHKPATH BASE-DEFER_OPEN BASE-DELAYWRITE BASE-DELETE"
 base="$base BASE-DENY1 BASE-DENY2 BASE-DENY3 BASE-DENYDOS BASE-DIR1 BASE-DIR2"
index 1d55087c88527a74a6e4342fe85731affd0f60f8..f60c7d7c0b8237b6ccf4c022cbb19b70038124bb 100755 (executable)
@@ -17,8 +17,10 @@ SMBCLIENT="$VALGRIND ${SMBCLIENT:-$BINDIR/smbclient} $CONFIGURATION"
 shift 4
 ADDARGS="$*"
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 failed=0
 
index 2ec20dc6acd92d2d9ea4f35e9d5357adf8df45fb..842277b3577623e07b8a4dfdce039de31ee6984a 100755 (executable)
@@ -16,8 +16,10 @@ start="$4"
 shift 4
 ADDARGS="$*"
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 tests="FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7"
 #tests="$tests UNLINK BROWSE ATTR TRANS2 MAXFID TORTURE "
index 6ea27945374c4fc1577a5f00e6f6144a66fa4ccb..c88fc2d9d591e63d214f95856740e7041756a03b 100755 (executable)
@@ -8,8 +8,10 @@
 TEMP_CONFFILE=${LIBDIR}/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
 
index e3bf1b9e708fa438e3c31e15d5b59e4c41e3bb9b..fa6e20fc7269fd1e705f9c85be38601a3a1ee284 100755 (executable)
@@ -14,8 +14,10 @@ password="$4"
 shift 4
 ADDARGS="$*"
 
+test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
 incdir=`dirname $0`
 . $incdir/test_functions.sh
+}
 
 OLDIFS=$IFS;