summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/script/gdb_run6
-rw-r--r--source4/script/valgrind_run7
-rw-r--r--source4/selftest/config.mk12
-rwxr-xr-xsource4/selftest/selftest.pl3
-rwxr-xr-xsource4/selftest/test_subunit.pl7
5 files changed, 25 insertions, 10 deletions
diff --git a/source4/script/gdb_run b/source4/script/gdb_run
index 146259d705..8ad101ed60 100755
--- a/source4/script/gdb_run
+++ b/source4/script/gdb_run
@@ -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"
diff --git a/source4/script/valgrind_run b/source4/script/valgrind_run
index 6aa54c70f1..45361c22b1 100644
--- a/source4/script/valgrind_run
+++ b/source4/script/valgrind_run
@@ -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 $@
diff --git a/source4/selftest/config.mk b/source4/selftest/config.mk
index d8b886a6dc..0d5f4d6ab4 100644
--- a/source4/selftest/config.mk
+++ b/source4/selftest/config.mk
@@ -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
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index 7401205041..96409558b1 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -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
index 0000000000..28522ed49f
--- /dev/null
+++ b/source4/selftest/test_subunit.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+
+use Test::More tests => 0;
+use FindBin qw($RealBin);
+use lib $RealBin;
+use Subunit qw(parse_results);
+