aboutsummaryrefslogtreecommitdiff
path: root/test/module.mk
diff options
context:
space:
mode:
authorMax Horn2006-03-29 11:00:39 +0000
committerMax Horn2006-03-29 11:00:39 +0000
commit4d4c29787eaee56904661df0fc183bd7b614609d (patch)
treedc9d550d9be05c809f678a9c5b69f39d3ed5ba26 /test/module.mk
parentc5511a049ab57a07f92d0de8cd66d2d13643563e (diff)
downloadscummvm-rg350-4d4c29787eaee56904661df0fc183bd7b614609d.tar.gz
scummvm-rg350-4d4c29787eaee56904661df0fc183bd7b614609d.tar.bz2
scummvm-rg350-4d4c29787eaee56904661df0fc183bd7b614609d.zip
Improved the 'test' build rule
svn-id: r21492
Diffstat (limited to 'test/module.mk')
-rw-r--r--test/module.mk32
1 files changed, 22 insertions, 10 deletions
diff --git a/test/module.mk b/test/module.mk
index f5cd40f117..028335c223 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -1,17 +1,29 @@
######################################################################
# Unit/regression tests, based on CxxTest.
# Use the 'test' target to run them.
-# Edit 'TESTS' to add more tests.
+# Edit TESTS and TESTLIBS to add more tests.
+#
######################################################################
-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 $@ $+
+TESTS := test/common/*.h
+TEST_LIBS := common/libcommon.a
+
+#
+TEST_FLAGS := --runner=StdioPrinter
+TEST_CFLAGS := -Itest/cxxtest
+TEST_LDFLAGS :=
+
+
+# Enable this to get an X11 GUI for the error reporter.
+#TEST_FLAGS += --gui=X11Gui
+#TEST_LDFLAGS += -L/usr/X11R6/lib -lX11
+
+
+test: test/runner
+ ./test/runner
+test/runner: test/runner.cpp $(TEST_LIBS)
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TEST_LDFLAGS) $(TEST_CFLAGS) -o $@ $+
+test/runner.cpp: $(TESTS)
+ test/cxxtest/cxxtestgen.py $(TEST_FLAGS) -o $@ $+
.PHONY: test