From 1b9b6bd1ad2d862a7df86096e96991135f0fb92c Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 22 Dec 2011 12:15:45 -0800 Subject: Fixed the open-source build. --- Makefile | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5320876..8449013 100644 --- a/Makefile +++ b/Makefile @@ -199,12 +199,10 @@ SIMPLE_TESTS= \ tests/test_varint \ tests/tests \ -INTERACTIVE_TESTS= \ +# Too many tests in this binary to run Valgrind (it takes minutes). +SLOW_TESTS= \ tests/test_decoder \ -# tests/test_stream \ - - SIMPLE_CXX_TESTS= \ tests/test_table \ tests/test_cpp \ @@ -214,9 +212,7 @@ VARIADIC_TESTS= \ tests/t.test_vs_proto2.googlemessage2 \ TESTS=$(SIMPLE_TESTS) $(SIMPLE_CXX_TESTS) $(VARIADIC_TESTS) - - -tests: $(TESTS) $(INTERACTIVE_TESTS) +tests: $(TESTS) $(TESTS): $(LIBUPB) tests/tests: tests/test.proto.pb @@ -228,13 +224,21 @@ VALGRIND=valgrind --leak-check=full --error-exitcode=1 test: tests @echo Running all tests under valgrind. @set -e # Abort on error. - @for test in $(TESTS); do \ + @for test in $(SIMPLE_TESTS) $(SIMPLE_CXX_TESTS); do \ + if [ -x ./$$test ] ; then \ + echo !!! $(VALGRIND) ./$$test tests/test.proto.pb; \ + $(VALGRIND) ./$$test tests/test.proto.pb || exit 1; \ + fi \ + done; + @for test in "$(SLOW_TESTS)"; do \ if [ -x ./$$test ] ; then \ - echo !!! $(VALGRIND) ./$$test; \ - $(VALGRIND) ./$$test || exit 1; \ + echo !!! ./$$test; \ + ./$$test || exit 1; \ fi \ - done; \ - echo "All tests passed!" + done; + @$(VALGRIND) tests/t.test_vs_proto2.googlemessage1 benchmarks/google_messages.proto.pb benchmarks/google_message1.dat + @$(VALGRIND) tests/t.test_vs_proto2.googlemessage2 benchmarks/google_messages.proto.pb benchmarks/google_message2.dat + @echo "All tests passed!" tests/t.test_vs_proto2.googlemessage1 \ tests/t.test_vs_proto2.googlemessage2: \ -- cgit v1.2.3