summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-22 00:47:44 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-24 01:51:00 -0600
commit6915cad1274a8495439b41d5046daeef24d2c36b (patch)
treee017ee6d1bae5246955c254d2d820af6dd1cc2e8
parent30ce895e0c75c50bbe510b6a3685c7e1f217b919 (diff)
downloadsamba-6915cad1274a8495439b41d5046daeef24d2c36b.tar.gz
samba-6915cad1274a8495439b41d5046daeef24d2c36b.tar.bz2
samba-6915cad1274a8495439b41d5046daeef24d2c36b.zip
r26560: Add script for running in valgrind.
(This used to be commit cb5d6a9ee27cea4a7a34c3249eed55f601630b82)
-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