aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/protobuf/3.4.0/more_tests
diff options
context:
space:
mode:
authorGravatar Vladimir Moskva <vladmos@google.com>2017-08-24 17:23:35 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-09-01 13:56:29 +0200
commit621c096ff76b898118f2033b3ac974d73e137ede (patch)
treec7971f9f78c382853700c1806c8416c8229e0b6c /third_party/protobuf/3.4.0/more_tests
parent8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147 (diff)
Update third_party/protobuf from 3.2.0 to 3.4.0
Change-Id: I3648aadad5895f80051ada39d0ca862dd437cc58
Diffstat (limited to 'third_party/protobuf/3.4.0/more_tests')
-rwxr-xr-xthird_party/protobuf/3.4.0/more_tests/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/third_party/protobuf/3.4.0/more_tests/Makefile b/third_party/protobuf/3.4.0/more_tests/Makefile
new file mode 100755
index 0000000000..286cf0f12c
--- /dev/null
+++ b/third_party/protobuf/3.4.0/more_tests/Makefile
@@ -0,0 +1,41 @@
+# Additional tests to run before releasing a package.
+#
+# Run like:
+# make PACKAGE=/path/to/protobuf-VERSION.tar.gz
+#
+# Some of these tests require tools or make assumptions that may not be
+# available on end-user machines, so these cannot be part of "make check". For
+# example, we test that the headers compile with strict warning settings, but
+# since different compilers produce wildly different warnings we cannot assume
+# that this test will pass everywhere. If we ran it as part of "make check",
+# it could unnecessarily block users from running the real tests just because
+# their compiler produces some extra warnings that probably aren't a big deal.
+# So we run it separately.
+
+all: header_warning_test
+
+clean:
+ rm -rf src target header_warning_test.cc header_warning_test.o header_warning_test
+
+# Unpack the package into src, then install it into target.
+PACKAGE=protobuf.tar.gz
+
+src: $(PACKAGE)
+ tar zxvf $(PACKAGE)
+ mv `basename $(PACKAGE) .tar.gz` src
+
+target: src
+ (cd src && ./configure --prefix=$$PWD/../target --disable-shared)
+ (cd src && make -j4 check)
+ (cd src && make install)
+
+# Verify that headers produce no warnings even under strict settings.
+header_warning_test.cc: target
+ ( (cd target/include && find google/protobuf -name '*.h') | \
+ awk '{print "#include \""$$1"\""} ' > header_warning_test.cc )
+
+header_warning_test: header_warning_test.cc
+ # TODO(kenton): Consider adding -pedantic and -Weffc++. Currently these
+ # produce tons of extra warnings so we'll need to do some work first.
+ g++ -Itarget/include -Wall -Werror -Wsign-compare -O2 -c header_warning_test.cc
+ touch header_warning_test