summaryrefslogtreecommitdiff
path: root/source4/script/tests/test_functions.sh
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-11 04:07:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:58 -0500
commit612babc4af9c54788f6267e11bac5d0bf5370ab5 (patch)
treee09f30e94c78dc384d2c9f21054d14bd85332880 /source4/script/tests/test_functions.sh
parent6a4cb0e651bc65d362fefb261ef45062ab4736ef (diff)
downloadsamba-612babc4af9c54788f6267e11bac5d0bf5370ab5.tar.gz
samba-612babc4af9c54788f6267e11bac5d0bf5370ab5.tar.bz2
samba-612babc4af9c54788f6267e11bac5d0bf5370ab5.zip
r7485: - allow test_xxx.sh to run outside of 'make test' by ensuring $PREFIX is setup
- use loopback interface only, otherwise nbtd will answer with a real ip, which the socket wrapper code will fail to connect to - enable eadb for posix testing - sleeping to wait for smbd to start is pointless, as smbd won't start till its fifo is opened due to the fifo redirection on stdin - sleep for a few seconds to allow for nbt server to register names after opening fifo - use bcast name resolution, so we don't rely on /etc/hosts being right (This used to be commit 9ce2b9a79ba34705bcd8c32db1e084763702faec)
Diffstat (limited to 'source4/script/tests/test_functions.sh')
-rw-r--r--source4/script/tests/test_functions.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/script/tests/test_functions.sh b/source4/script/tests/test_functions.sh
index a2636b3354..e24e1062b0 100644
--- a/source4/script/tests/test_functions.sh
+++ b/source4/script/tests/test_functions.sh
@@ -29,7 +29,6 @@ smbd_check_or_start() {
echo "smbd exists with status $ret" >>$SMBD_TEST_LOG;
exit $ret;
) || exit $? &) 2>/dev/null || exit $?
- sleep 2
echo "DONE"
fi
return 0;
@@ -55,7 +54,11 @@ smbd_have_test_log() {
}
testit() {
- name=$1
+ if [ -z "$PREFIX" ]; then
+ PREFIX=test_prefix
+ mkdir -p $PREFIX
+ fi
+ name=$1
shift 1
SMBD_IS_UP="no"
TEST_LOG="$PREFIX/test_log.$$"