mirror of https://github.com/grpc/grpc.git
The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
5 years ago
|
#!/bin/bash
|
||
|
|
||
5 years ago
|
set -ex
|
||
|
|
||
5 years ago
|
# Install the latest version of Bazel.
|
||
5 years ago
|
if [ -x "$(command -v use_bazel.sh)" ]; then
|
||
|
use_bazel.sh latest
|
||
|
fi
|
||
5 years ago
|
|
||
|
# Verify/query CMake
|
||
|
echo PATH=$PATH
|
||
|
ls -l `which cmake`
|
||
|
cmake --version
|
||
5 years ago
|
echo CC=${CC:-cc}
|
||
|
${CC:-cc} --version
|
||
5 years ago
|
|
||
|
# Log the bazel path and version.
|
||
|
which bazel
|
||
|
bazel version
|
||
|
|
||
|
cd $(dirname $0)/../..
|
||
|
bazel test --test_output=errors :all
|
||
5 years ago
|
|
||
|
if [[ $(uname) = "Linux" ]]; then
|
||
|
# Verify the ASAN build. Have to exclude test_conformance_upb as protobuf
|
||
|
# currently leaks memory in the conformance test runner.
|
||
5 years ago
|
bazel test --copt=-fsanitize=address --linkopt=-fsanitize=address --test_output=errors :all
|
||
5 years ago
|
|
||
|
# Verify the UBSan build. Have to exclude Lua as the version we are using
|
||
|
# fails some UBSan tests.
|
||
|
|
||
|
# For some reason kokoro doesn't have Clang available right now.
|
||
|
#CC=clang CXX=clang++ bazel test -c dbg --copt=-fsanitize=undefined --copt=-fno-sanitize=function,vptr --linkopt=-fsanitize=undefined --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 -- :all -:test_lua
|
||
4 years ago
|
|
||
|
fi
|
||
|
|
||
|
if which valgrind; then
|
||
|
bazel test --run_under='valgrind --leak-check=full --error-exitcode=1' :all -- -:test_conformance_upb -:cmake_build
|
||
5 years ago
|
fi
|