diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-10-08 20:38:25 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2006-10-08 20:38:25 +0000 |
commit | d15a6528f65a19b6951cb161b7afe3cbfa3f12b0 (patch) | |
tree | 49ba2ea562d59717ddae6bcd39835bed0f76803c /source/script | |
parent | d302be3f6937ca27989a0794a628b3b12788b804 (diff) | |
download | samba-d15a6528f65a19b6951cb161b7afe3cbfa3f12b0.tar.gz samba-d15a6528f65a19b6951cb161b7afe3cbfa3f12b0.tar.xz samba-d15a6528f65a19b6951cb161b7afe3cbfa3f12b0.zip |
r19170: use a very clever trick to pass the binary name to the
gdb_backtrace script, I never noticed that %$(envvar)
exists...
Thanks to Bjoern Jacke for the suggestion!
metze
Diffstat (limited to 'source/script')
-rwxr-xr-x | source/script/tests/selftest.sh | 7 | ||||
-rw-r--r-- | source/script/tests/test_functions.sh | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/source/script/tests/selftest.sh b/source/script/tests/selftest.sh index 80efb68f6a9..f4dcee1a7d4 100755 --- a/source/script/tests/selftest.sh +++ b/source/script/tests/selftest.sh @@ -106,7 +106,7 @@ cat >$CONFFILE<<EOF [global] netbios name = TORTURE_6 interfaces = $TORTURE_INTERFACES - panic action = $SCRIPTDIR/gdb_backtrace %d + panic action = $SCRIPTDIR/gdb_backtrace %d %\$(MAKE_TEST_BINARY) include = $COMMONCONFFILE EOF @@ -123,7 +123,7 @@ cat >$SERVERCONFFILE<<EOF netbios name = $SERVER interfaces = $SERVER_IP/8 bind interfaces only = yes - panic action = $SCRIPTDIR/gdb_backtrace %d + panic action = $SCRIPTDIR/gdb_backtrace %d %\$(MAKE_TEST_BINARY) include = $COMMONCONFFILE ; Necessary to add the build farm hacks @@ -174,6 +174,9 @@ export NMBD_TEST_LOG SMBD_TEST_LOG="$PREFIX/smbd_test.log" export SMBD_TEST_LOG +MAKE_TEST_BINARY="" +export MAKE_TEST_BINARY + # start off with 0 failures failed=0 export failed diff --git a/source/script/tests/test_functions.sh b/source/script/tests/test_functions.sh index 913e93210ae..cbec86e70ce 100644 --- a/source/script/tests/test_functions.sh +++ b/source/script/tests/test_functions.sh @@ -43,8 +43,11 @@ samba3_check_or_start() { if test x"$NMBD_MAXTIME" = x; then NMBD_MAXTIME=2700 fi + MAKE_TEST_BINARY=$BINDIR/nmbd + export MAKE_TEST_BINARY timelimit $NMBD_MAXTIME $NMBD_VALGRIND $BINDIR/nmbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $NMBD_TEST_LOG 2>&1 & TIMELIMIT_NMBD_PID=$! + MAKE_TEST_BINARY= echo $TIMELIMIT_NMBD_PID > $PIDDIR/timelimit.nmbd.pid wait $TIMELIMIT_NMBD_PID ret=$?; @@ -72,8 +75,11 @@ samba3_check_or_start() { if test x"$SMBD_MAXTIME" = x; then SMBD_MAXTIME=2700 fi + MAKE_TEST_BINARY=$BINDIR/smbd + export MAKE_TEST_BINARY timelimit $SMBD_MAXTIME $SMBD_VALGRIND $BINDIR/smbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $SMBD_TEST_LOG 2>&1 & TIMELIMIT_SMBD_PID=$! + MAKE_TEST_BINARY= echo $TIMELIMIT_SMBD_PID > $PIDDIR/timelimit.smbd.pid wait $TIMELIMIT_SMBD_PID ret=$?; @@ -133,6 +139,7 @@ testit() { fi name=$1 shift 1 + binary=$1 cmdline="$*" SERVERS_ARE_UP="no" @@ -180,8 +187,11 @@ testit() { export SOCKET_WRAPPER_PCAP_FILE fi + MAKE_TEST_BINARY=$binary + export MAKE_TEST_BINARY ( $cmdline > $TEST_LOG 2>&1 ) status=$? + MAKE_TEST_BINARY= # show any additional output from smbd that has happened in this test samba3_nmbd_test_log && { new_log_size=`wc -l < $NMBD_TEST_LOG`; |