aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Loo Rong Jie <loorongjie@gmail.com>2018-07-10 03:08:36 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-10 03:09:45 -0700
commit0399f38a163c76a7c3fe9c5be25dbd89fd4717cb (patch)
treea5c7671c2bf235549c4d284f82a0aa7138ef59b3 /src/test/shell
parent9162bd920751d3e8c7b0fc3af3009af7e4b3b828 (diff)
Update third_party/protobuf to 3.6.0
Fixes #5439. PiperOrigin-RevId: 203917717
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/integration/bazel_command_log_test.sh18
-rwxr-xr-xsrc/test/shell/testenv.sh2
2 files changed, 19 insertions, 1 deletions
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"