summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/main.mk2
-rw-r--r--source4/script/valgrind_run2
-rw-r--r--source4/selftest/config.mk8
3 files changed, 8 insertions, 4 deletions
diff --git a/source4/main.mk b/source4/main.mk
index c572f7e79c..38c76bb99c 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -43,6 +43,8 @@ manpages: $(MANPAGES)
all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
everything: all libraries headers
+LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
+
# 'make testsuite' creates all binaries which are
# needed by samba3's 'make test' and the build-farm
# scripts use that it as fallback in case
diff --git a/source4/script/valgrind_run b/source4/script/valgrind_run
new file mode 100644
index 0000000000..6aa54c70f1
--- /dev/null
+++ b/source4/script/valgrind_run
@@ -0,0 +1,2 @@
+#!/bin/sh
+valgrind -q --db-attach=yes --num-callers=30 $@
diff --git a/source4/selftest/config.mk b/source4/selftest/config.mk
index ab04c60a11..d8b886a6dc 100644
--- a/source4/selftest/config.mk
+++ b/source4/selftest/config.mk
@@ -1,6 +1,6 @@
TEST_FORMAT = plain
-SELFTEST = $(LIB_PATH_VAR)=$(builddir)/bin/shared $(PERL) $(srcdir)/selftest/selftest.pl --prefix=${selftest_prefix} \
+SELFTEST = $(LD_LIBPATH_OVERRIDE) $(PERL) $(srcdir)/selftest/selftest.pl --prefix=${selftest_prefix} \
--builddir=$(builddir) --srcdir=$(srcdir) \
--expected-failures=$(srcdir)/samba4-knownfail \
--format=$(TEST_FORMAT) \
@@ -37,17 +37,17 @@ testenv: everything
valgrindtest: valgrindtest-all
valgrindtest-quick: all
- SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
+ SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run" \
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 valgrind -q --db-attach=yes --num-callers=30" \
+ SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run" \
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 valgrind -q --db-attach=yes --num-callers=30" \
+ SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run" \
VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
$(SELFTEST) --socket-wrapper --testenv