aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Loo Rong Jie <loorongjie@gmail.com>2018-06-21 11:29:04 +0800
committerGravatar Jakob Buchgraber <buchgr@google.com>2018-07-09 16:28:56 +0200
commit6fd4e0edd4de22dec9eda13dc0b29214f2ca117e (patch)
treee05b713ab4eceb88e6686e34e2a98426b16009bc /src/test
parent868060b2925a98a22c4a2e760dd38da0bef6146c (diff)
Update protobuf to 3.6.0. Fixes #5439
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/cpp/BUILD2
-rwxr-xr-xsrc/test/shell/integration/bazel_command_log_test.sh18
-rwxr-xr-xsrc/test/shell/testenv.sh2
3 files changed, 20 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/BUILD b/src/test/java/com/google/devtools/build/lib/rules/cpp/BUILD
index fe502fd67e..8fa0c86c49 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/BUILD
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/BUILD
@@ -83,7 +83,7 @@ java_library(
"//third_party:junit4",
"//third_party:truth",
"//third_party/java/dd_plist",
- "//third_party/protobuf/3.4.0:protobuf_java",
+ "//third_party/protobuf:protobuf_java",
],
)
diff --git a/src/test/shell/integration/bazel_command_log_test.sh b/src/test/shell/integration/bazel_command_log_test.sh
index 91294daa89..3e7443c353 100755
--- a/src/test/shell/integration/bazel_command_log_test.sh
+++ b/src/test/shell/integration/bazel_command_log_test.sh
@@ -46,12 +46,29 @@ function strip_lines_from_bazel_cc() {
echo "$clean_log" > $TEST_log
}
+function strip_protobuf_unsafe_warning() {
+ # TODO: Protobuf triggers illegal reflective access warning in JDK 9.
+ # Remove this workaround when protobuf fixes this.
+ # See https://github.com/google/protobuf/issues/3781
+ clean_log=$(\
+ sed \
+ -e "/^WARNING: An illegal reflective access operation has occurred/d" \
+ -e "/^WARNING: Illegal reflective access by com\.google\.protobuf\.UnsafeUtil /d" \
+ -e "/^WARNING: Please consider reporting this to the maintainers of com\.google\.protobuf\.UnsafeUtil/d" \
+ -e "/^WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations/d" \
+ -e "/^WARNING: All illegal access operations will be denied in a future release/d" \
+ $TEST_log)
+
+ echo "$clean_log" > $TEST_log
+}
+
function test_batch_mode() {
# capture stdout/stderr in $TEST_log
bazel --batch info >&$TEST_log || fail "Expected success"
# strip extra lines printed by bazel.cc
strip_lines_from_bazel_cc
+ strip_protobuf_unsafe_warning
# compare $TEST_log with command.log
assert_equals "" "$(diff $TEST_log $log 2>&1)"
@@ -68,6 +85,7 @@ function test_batch_mode_with_logging_flag() {
# strip extra lines printed by bazel.cc
strip_lines_from_bazel_cc
+ strip_protobuf_unsafe_warning
# compare $TEST_log with command.log
assert_equals "" "$(diff $TEST_log $log 2>&1)"
diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh
index b2f6e24147..c4a0c5599d 100755
--- a/src/test/shell/testenv.sh
+++ b/src/test/shell/testenv.sh
@@ -115,7 +115,7 @@ if [ "${MACHINE_TYPE}" = 's390x' ]; then
fi
# Requires //third_party/protobuf:protoc
-protoc_compiler="${BAZEL_RUNFILES}/third_party/protobuf/3.4.0/protoc"
+protoc_compiler="${BAZEL_RUNFILES}/third_party/protobuf/3.6.0/protoc"
if [ -z ${RUNFILES_MANIFEST_ONLY+x} ]; then
junit_jar="${BAZEL_RUNFILES}/third_party/junit/junit-*.jar"