# HG changeset patch # User Lucas Thompson # Date 1486465637 0 # Node ID 70b0f1f9e039576645a16e570d2a3e6833c93d21 # Parent 6859f35cb4f8464c7c65734b24c4b94afdc64f27 Setup test harness (Catch), integrate into build system. diff -r 6859f35cb4f8 -r 70b0f1f9e039 Makefile --- 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 diff -r 6859f35cb4f8 -r 70b0f1f9e039 test/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/main.cpp Tue Feb 07 11:07:17 2017 +0000 @@ -0,0 +1,2 @@ +#define CATCH_CONFIG_MAIN +#include "catch/catch.hpp" diff -r 6859f35cb4f8 -r 70b0f1f9e039 test/vamp-client/tst_PluginStub.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/vamp-client/tst_PluginStub.cpp Tue Feb 07 11:07:17 2017 +0000 @@ -0,0 +1,5 @@ +#include "catch/catch.hpp" + +TEST_CASE("Configure plugin with parameter dependent preferred framing sizes") { + +}