r26561: Fix make gdbtest, valgrindtest and testenv for shared libs.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 22 Dec 2007 06:47:48 +0000 (00:47 -0600)
committerStefan Metzmacher <metze@samba.org>
Mon, 24 Dec 2007 07:51:00 +0000 (01:51 -0600)
(This used to be commit d2b9055bc032506849827d6fab2d2b9d35d132e2)

source4/script/gdb_run
source4/script/valgrind_run
source4/selftest/config.mk
source4/selftest/selftest.pl
source4/selftest/test_subunit.pl [new file with mode: 0755]

index 146259d7050b145a82086b0905d1c4f0c2396f33..8ad101ed60a68b47d3b1c67763092eabfd24570a 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+ENV="$1"
+
+shift 1
+
 if test -z "$TMPDIR"; then
        TMPDIR="/tmp"
 fi
@@ -13,4 +17,4 @@ EOF
 trap "/bin/rm -f $TMPFILE" EXIT
 CMD="gdb -x $TMPFILE --args $@"
 echo $CMD
-eval "$CMD"
+eval $ENV "$CMD"
index 6aa54c70f12917a7980b000c8ca7069d061d62de..45361c22b10e487c3a95ef3588640291776db2b9 100644 (file)
@@ -1,2 +1,7 @@
 #!/bin/sh
-valgrind -q --db-attach=yes --num-callers=30 $@
+
+ENV="$1"
+
+shift 1
+
+$ENV valgrind -q --db-attach=yes --num-callers=30 $@
index d8b886a6dce51f53d4c7eacbc6773d458afbeb60..0d5f4d6ab47c4de2e06889418512b58800ac7c6c 100644 (file)
@@ -37,32 +37,32 @@ testenv: everything
 valgrindtest: valgrindtest-all
 
 valgrindtest-quick: all
-       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run" \
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
        VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
        $(SELFTEST) --quick --immediate --socket-wrapper $(TESTS)
 
 valgrindtest-all: everything
-       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run" \
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
        VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
        $(SELFTEST) --immediate --socket-wrapper $(TESTS)
 
 valgrindtest-env: everything
-       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run" \
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
        VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
        $(SELFTEST) --socket-wrapper --testenv
 
 gdbtest: gdbtest-all
 
 gdbtest-quick: all
-       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
        $(SELFTEST) --immediate --quick --socket-wrapper $(TESTS)
 
 gdbtest-all: everything
-       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
        $(SELFTEST) --immediate --socket-wrapper $(TESTS)
 
 gdbtest-env: everything
-       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
        $(SELFTEST) --socket-wrapper --testenv
 
 wintest: all
index 740120504170215252d41dcef36f09024bad0ab2..96409558b186daf5c5203d1d4514688bcc7e4a8b 100755 (executable)
@@ -539,7 +539,6 @@ sub write_clientconf($$)
        close(CF);
 }
 
-
 my @torture_options = ();
 push (@torture_options, "--configfile=$conffile");
 # ensure any one smbtorture call doesn't run too long
@@ -769,7 +768,7 @@ TORTURE_OPTIONS=\$TORTURE_OPTIONS
 CONFIGURATION=\$CONFIGURATION
 
 $envvarstr
-\" && bash'");
+\" && LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH} bash'");
        teardown_env($testenv_name);
 } else {
        foreach (@todo) {
diff --git a/source4/selftest/test_subunit.pl b/source4/selftest/test_subunit.pl
new file mode 100755 (executable)
index 0000000..28522ed
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+
+use Test::More tests => 0;
+use FindBin qw($RealBin);
+use lib $RealBin;
+use Subunit qw(parse_results);
+