r26560: Add script for running in valgrind.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 22 Dec 2007 06:47:44 +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 cb5d6a9ee27cea4a7a34c3249eed55f601630b82)

source4/main.mk
source4/script/valgrind_run [new file with mode: 0644]
source4/selftest/config.mk

index c572f7e79c1c68d9e37bc65faa96e9fd92102714..38c76bb99c514645914d61c7fc14fc1379680713 100644 (file)
@@ -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 (file)
index 0000000..6aa54c7
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+valgrind -q --db-attach=yes --num-callers=30 $@
index ab04c60a1190d6119922ef792cdf98fd7baffa26..d8b886a6dce51f53d4c7eacbc6773d458afbeb60 100644 (file)
@@ -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