summaryrefslogtreecommitdiff
path: root/abseil-cpp/ci/macos_xcode_bazel.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abseil-cpp/ci/macos_xcode_bazel.sh')
-rwxr-xr-xabseil-cpp/ci/macos_xcode_bazel.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/abseil-cpp/ci/macos_xcode_bazel.sh b/abseil-cpp/ci/macos_xcode_bazel.sh
index 738adf9..04c9a1a 100755
--- a/abseil-cpp/ci/macos_xcode_bazel.sh
+++ b/abseil-cpp/ci/macos_xcode_bazel.sh
@@ -24,7 +24,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
# If we are running on Kokoro, check for a versioned Bazel binary.
-KOKORO_GFILE_BAZEL_BIN="bazel-2.0.0-darwin-x86_64"
+KOKORO_GFILE_BAZEL_BIN="bazel-5.1.1-darwin-x86_64"
if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then
BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}"
chmod +x ${BAZEL_BIN}
@@ -32,6 +32,13 @@ else
BAZEL_BIN="bazel"
fi
+# Avoid depending on external sites like GitHub by checking --distdir for
+# external dependencies first.
+# https://docs.bazel.build/versions/master/guide.html#distdir
+if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -d "${KOKORO_GFILE_DIR}/distdir" ]]; then
+ BAZEL_EXTRA_ARGS="--distdir=${KOKORO_GFILE_DIR}/distdir ${BAZEL_EXTRA_ARGS:-}"
+fi
+
# Print the compiler and Bazel versions.
echo "---------------"
gcc -v
@@ -46,9 +53,13 @@ if [[ -n "${ALTERNATE_OPTIONS:-}" ]]; then
fi
${BAZEL_BIN} test ... \
- --copt=-Werror \
+ --copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \
+ --copt="-Werror" \
+ --cxxopt="-std=c++14" \
+ --features=external_include_paths \
--keep_going \
--show_timestamps \
--test_env="TZDIR=${ABSEIL_ROOT}/absl/time/internal/cctz/testdata/zoneinfo" \
--test_output=errors \
- --test_tag_filters=-benchmark
+ --test_tag_filters=-benchmark \
+ ${BAZEL_EXTRA_ARGS:-}