From c76d86c68f6dd89e90687dff3559b32ad99dfc89 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 24 Dec 2003 16:17:13 +0000 Subject: [PATCH] added test target to Makefile (so you can do 'make test' now, provided you have cxxtest installed) svn-id: r11887 --- Makefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 609a0492641..93a5100a37d 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,8 @@ include config.mak # Uncomment this for stricter compile time code verification # CXXFLAGS+= -Werror -CXXFLAGS:= -O -Wall -Wuninitialized $(CXXFLAGS) +CXXFLAGS:= -Wall $(CXXFLAGS) +CXXFLAGS+= -O -Wuninitialized CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas # Even more warnings... CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion @@ -62,6 +63,24 @@ deb: fakeroot debian/rules binary +####################################################################### +# Unit/regression tests # +# In order to use 'make test' you have to install cxxtest inside the # +# test/cxxtest dir. Get it from http://cxxtest.sourceforge.net. # +####################################################################### + +CXXTEST := test/cxxtest +TESTS := test/common/*.h +CPPFLAGS += -I$(CXXTEST) +test: runner + ./runner +runner: runner.o common/libcommon.a + $(CXX) -o $@ $+ +runner.cpp: $(TESTS) + $(CXXTEST)/cxxtestgen.py --error-printer -o $@ $+ + + + # Special target to create a application wrapper for Mac OS X bundle_name = ScummVM.app bundle: scummvm-static