aboutsummaryrefslogtreecommitdiff
path: root/src/tools/linux
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-01-13 07:41:22 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-01-13 07:41:22 +0000
commit7b873221e6741208827b2a4a5f2dda35ceccb474 (patch)
treee989fdd6bdcd1dd3f8021b0095c51ad117abfab4 /src/tools/linux
parentBreakpad processor: Opening a map file is not an error. (diff)
downloadbreakpad-7b873221e6741208827b2a4a5f2dda35ceccb474.tar.xz
Linux Breakpad Dumper: support running unit tests under valgrind or other wrapper programs.
This adds a new variable, TEST_WRAPPER, to src/tools/linux/dump_syms. Comments in the patch provide details. This patch also moves the public variable section to sit after the public phony targets. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@486 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/tools/linux')
-rw-r--r--src/tools/linux/dump_syms/Makefile44
1 files changed, 28 insertions, 16 deletions
diff --git a/src/tools/linux/dump_syms/Makefile b/src/tools/linux/dump_syms/Makefile
index 8917a610..78a1a1ab 100644
--- a/src/tools/linux/dump_syms/Makefile
+++ b/src/tools/linux/dump_syms/Makefile
@@ -1,18 +1,3 @@
-### Variables that can be overridden on the command line.
-CC = gcc
-CXX = g++
-CPPFLAGS = -DNDEBUG
-CXXFLAGS = -g3 -O2 -Wall -m32
-
-# To produce test coverage reports:
-# 1) Build all .o files and executables without optimization and with
-# 'COVERAGE=1' on the make command line.
-# 2) Run the tests.
-# 3) Do 'make coverage'.
-# All in one command:
-# $ make CFLAGS='-O0' CXXFLAGS='-O0' COVERAGE=1 clean check coverage
-COVERAGE=
-
# Build all executables.
all::
@@ -38,6 +23,33 @@ coverage-reset:
.PHONY: all clean check coverage coverage-reset
+### Variables that are useful to override on the command line.
+CC = gcc
+CXX = g++
+CPPFLAGS = -DNDEBUG
+CXXFLAGS = -g3 -O2 -Wall -m32
+
+# To produce test coverage reports:
+# 1) Build all .o files and executables without optimization and with
+# 'COVERAGE=1' on the make command line.
+# 2) Run the tests.
+# 3) Do 'make coverage'.
+# All in one command:
+# $ make CFLAGS='-O0' CXXFLAGS='-O0' COVERAGE=1 clean check coverage
+COVERAGE=
+
+# A wrapper for running 'make check' targets. This is inserted before
+# the test executable name in the commands for 'check' targets. So if
+# 'make check' would normally execute some test program with the
+# command:
+#
+# SOME_ENV_VAR=value ./some-test-executable test-args
+#
+# then setting TEST_WRAPPER to 'valgrind' (say) would have 'make
+# check' run the this command line:
+#
+# SOME_ENV_VAR=value valgrind ./some-test-executable test-args
+TEST_WRAPPER=
### Variables used internally by this Makefile.
@@ -195,7 +207,7 @@ clean::
### appropriate for Google C++ Testing Framework test programs. But
### you can provide your own commands.
check-%: %
- srcdir=$(SRC) ./$< $(TEST_ARGS)
+ srcdir=$(SRC) $(TEST_WRAPPER) ./$< $(TEST_ARGS)
### Generic coverage reporting rules.