2006-03-29 10:35:45 +00:00
|
|
|
######################################################################
|
|
|
|
# Unit/regression tests, based on CxxTest.
|
|
|
|
# Use the 'test' target to run them.
|
2006-03-29 11:00:39 +00:00
|
|
|
# Edit TESTS and TESTLIBS to add more tests.
|
|
|
|
#
|
2006-03-29 10:35:45 +00:00
|
|
|
######################################################################
|
|
|
|
|
2006-03-29 11:00:39 +00:00
|
|
|
TESTS := test/common/*.h
|
|
|
|
TEST_LIBS := common/libcommon.a
|
|
|
|
|
|
|
|
#
|
|
|
|
TEST_FLAGS := --runner=StdioPrinter
|
|
|
|
TEST_CFLAGS := -Itest/cxxtest
|
2008-01-27 19:47:41 +00:00
|
|
|
TEST_LDFLAGS :=
|
2006-03-29 11:00:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
# 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 $@ $+
|
2006-03-29 10:35:45 +00:00
|
|
|
|
2006-03-29 11:05:38 +00:00
|
|
|
|
|
|
|
clean: clean-test
|
|
|
|
clean-test:
|
|
|
|
-$(RM) test/runner.cpp test/runner
|
|
|
|
|
|
|
|
.PHONY: test clean-test
|