12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #!/bin/bash
- set -euox pipefail
- if [[ -z ${GTEST_ROOT:-} ]]; then
- GTEST_ROOT="$(realpath $(dirname ${0})/..)"
- fi
- for cmake_off_on in OFF ON; do
- BUILD_DIR=$(mktemp -d build_dir.XXXXXXXX)
- cd ${BUILD_DIR}
- time cmake ${GTEST_ROOT} \
- -DCMAKE_CXX_STANDARD=11 \
- -Dgtest_build_samples=ON \
- -Dgtest_build_tests=ON \
- -Dgmock_build_tests=ON \
- -Dcxx_no_exception=${cmake_off_on} \
- -Dcxx_no_rtti=${cmake_off_on}
- time make
- time ctest -j$(nproc) --output-on-failure
- done
- KOKORO_GFILE_BAZEL_BIN="bazel-3.7.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
- cd ${GTEST_ROOT}
- for absl in 0 1; do
- ${BAZEL_BIN} test ... \
- --copt="-Wall" \
- --copt="-Werror" \
- --define="absl=${absl}" \
- --keep_going \
- --show_timestamps \
- --test_output=errors
- done
|