From 52cb2c6f4235dfaa3760ef37fe7082e9e99b0ebd Mon Sep 17 00:00:00 2001 From: jimblandy Date: Wed, 23 Dec 2009 21:46:00 +0000 Subject: Breakpad Linux dumper: Add unit tests for google_breakpad::Module. Adjust Module's interface a bit to facilitate testing: - Make AssignSourceIds something a client can call --- it's perfectly well-defined, so this is an okay change. - Add GetFunctions, GetFiles and FindExistingfile member functions, which the test harness will use to get results to examine. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@466 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/tools/linux/dump_syms/Makefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/linux/dump_syms/Makefile b/src/tools/linux/dump_syms/Makefile index 239e6f7a..c7cbaf67 100644 --- a/src/tools/linux/dump_syms/Makefile +++ b/src/tools/linux/dump_syms/Makefile @@ -52,7 +52,8 @@ SRC = ../../.. # dependencies using $(CXX). Value accumulated throughout the file. CPP_EXECUTABLES = -# Source files whose coverage we are interested in. Value accumulated +# Add the names of source files whose coverage you'd like 'make +# coverage' to report on to this variable. Value accumulated # throughout the file. COVERAGE_SOURCES = @@ -79,6 +80,7 @@ dump_stabs.o: dump_stabs.cc dump_symbols.o: dump_symbols.cc file_id.o: file_id.cc module.o: module.cc +COVERAGE_SOURCES += module.cc stabs_reader.o: stabs_reader.cc COVERAGE_SOURCES += stabs_reader.cc @@ -132,6 +134,22 @@ clean:: rm -f file_id_unittest +### Unit tests for google_breakpad::Module. +check: check-module_unittest +check-module_unittest: module_unittest +module_unittest: \ + gtest-all.o \ + gtest_main.o \ + module.o \ + module_unittest.o \ + $(empty) +CPP_EXECUTABLES += module_unittest +module_unittest.o: module_unittest.cc +module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS) +clean:: + rm -f module_unittest + + ### Generic compilation rules. # Link C++ executables using the C++ compiler; see CPP_EXECUTABLES above. -- cgit v1.2.1