diff options
Diffstat (limited to 'ci/macos_xcode_bazel.sh')
-rwxr-xr-x | ci/macos_xcode_bazel.sh | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ci/macos_xcode_bazel.sh b/ci/macos_xcode_bazel.sh index f0f14280..f5f2d759 100755 --- a/ci/macos_xcode_bazel.sh +++ b/ci/macos_xcode_bazel.sh @@ -23,16 +23,29 @@ if [ -z ${ABSEIL_ROOT:-} ]; then ABSEIL_ROOT="$(realpath $(dirname ${0})/..)" fi -# Print the default compiler and Bazel versions. +# If we are running on Kokoro, check for a versioned Bazel binary. +KOKORO_GFILE_BAZEL_BIN="bazel-2.0.0-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} +else + BAZEL_BIN="bazel" +fi + +# Print the compiler and Bazel versions. echo "---------------" gcc -v echo "---------------" -bazel version +${BAZEL_BIN} version echo "---------------" cd ${ABSEIL_ROOT} -bazel test ... \ +if [ -n "${ALTERNATE_OPTIONS:-}" ]; then + cp ${ALTERNATE_OPTIONS:-} absl/base/options.h || exit 1 +fi + +${BAZEL_BIN} test ... \ --copt=-Werror \ --keep_going \ --show_timestamps \ |