diff options
author | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-04-28 03:06:41 +0000 |
---|---|---|
committer | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-04-28 03:06:41 +0000 |
commit | c5ff06cc74e03e6846218b750b99c77d72a39a75 (patch) | |
tree | c450a33d1bb4775f7bf162d07e37982dd1833a0b /src/Makefile.am | |
parent | 503a4dd705065a74b8d009e347fdba1c18d35691 (diff) | |
download | protobuf-c5ff06cc74e03e6846218b750b99c77d72a39a75.tar.gz protobuf-c5ff06cc74e03e6846218b750b99c77d72a39a75.tar.bz2 protobuf-c5ff06cc74e03e6846218b750b99c77d72a39a75.zip |
Add second run of cpp_unittest which verifies that descriptors are constructed lazily. This is accomplished by avoiding any use of descriptors while testing a bunch of other operations, then checking at the end that descriptors have not been constructed.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 9206d094..902e6af8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -220,7 +220,15 @@ unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) $(protoc_outputs): unittest_proto_middleman -check_PROGRAMS = protobuf-test $(GZCHECKPROGRAMS) +COMMON_TEST_SOURCES = \ + google/protobuf/test_util.cc \ + google/protobuf/test_util.h \ + google/protobuf/testing/googletest.cc \ + google/protobuf/testing/googletest.h \ + google/protobuf/testing/file.cc \ + google/protobuf/testing/file.h + +check_PROGRAMS = protobuf-test protobuf-lazy-descriptor-test $(GZCHECKPROGRAMS) protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ $(top_builddir)/gtest/lib/libgtest.la \ $(top_builddir)/gtest/lib/libgtest_main.la @@ -251,12 +259,20 @@ protobuf_test_SOURCES = \ google/protobuf/compiler/parser_unittest.cc \ google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \ google/protobuf/compiler/cpp/cpp_unittest.cc \ - google/protobuf/test_util.cc \ - google/protobuf/test_util.h \ - google/protobuf/testing/googletest.cc \ - google/protobuf/testing/googletest.h \ - google/protobuf/testing/file.cc \ - google/protobuf/testing/file.h + $(COMMON_TEST_SOURCES) +nodist_protobuf_test_SOURCES = $(protoc_outputs) + +# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. +protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ + $(top_builddir)/gtest/lib/libgtest.la \ + $(top_builddir)/gtest/lib/libgtest_main.la +protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ + -I$(top_builddir)/gtest/include \ + -DPROTOBUF_TEST_NO_DESCRIPTORS +protobuf_lazy_descriptor_test_SOURCES = \ + google/protobuf/compiler/cpp/cpp_unittest.cc \ + $(COMMON_TEST_SOURCES) +nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs) if HAVE_ZLIB zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la @@ -266,6 +282,4 @@ zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc endif -nodist_protobuf_test_SOURCES = $(protoc_outputs) - -TESTS = protobuf-test $(GZTESTS) +TESTS = protobuf-test protobuf-lazy-descriptor-test $(GZTESTS) |