From 6915cad1274a8495439b41d5046daeef24d2c36b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 22 Dec 2007 00:47:44 -0600 Subject: r26560: Add script for running in valgrind. (This used to be commit cb5d6a9ee27cea4a7a34c3249eed55f601630b82) --- source4/main.mk | 2 ++ source4/script/valgrind_run | 2 ++ source4/selftest/config.mk | 8 ++++---- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 source4/script/valgrind_run 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 -- cgit