Mercurial > hg > piper-cpp
changeset 190:70b0f1f9e039
Setup test harness (Catch), integrate into build system.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Tue, 07 Feb 2017 11:07:17 +0000 |
parents | 6859f35cb4f8 |
children | 79c64ff2610b |
files | Makefile test/main.cpp test/vamp-client/tst_PluginStub.cpp |
diffstat | 3 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Tue Feb 07 10:25:15 2017 +0000 +++ b/Makefile Tue Feb 07 11:07:17 2017 +0000 @@ -10,7 +10,9 @@ LDFLAGS += -ldl -all: o bin bin/piper-convert bin/piper-vamp-simple-server +TEST_SRCS := test/vamp-client/tst_PluginStub.cpp + +all: o bin bin/piper-convert bin/piper-vamp-simple-server bin/test-suite bin: mkdir bin @@ -23,6 +25,9 @@ bin/piper-vamp-simple-server: o/simple-server.o o/json11.o o/piper.capnp.o c++ $(CXXFLAGS) $^ -o $@ $(LDFLAGS) + +bin/test-suite: test/main.cpp $(TEST_SRCS) + c++ $(CXXFLAGS) $(INCFLAGS) $< $(TEST_SRCS) -o $@ $(LDFLAGS) o/piper.capnp.o: vamp-capnp/piper.capnp.c++ c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@ @@ -42,13 +47,14 @@ c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@ test: all + bin/test-suite vamp-server/test.sh clean: rm -f */*.o distclean: clean - rm -f bin/* + rm -rf bin/* # cancel implicit rule which otherwise could try to link %.capnp %: %.o