Temporarily run bazel test multiple times

This commit is contained in:
Stanley Cheung 2019-03-20 00:09:40 -07:00 committed by Stanley Cheung
parent f9bfe720b5
commit ef94d2e7e0
1 changed files with 20 additions and 3 deletions

View File

@ -49,9 +49,26 @@ wget https://github.com/bazelbuild/bazel/releases/download/"${BAZEL_VERSION}"/ba
chmod +x ./bazel-"${BAZEL_VERSION}"-installer-linux-x86_64.sh
./bazel-"${BAZEL_VERSION}"-installer-linux-x86_64.sh --user
$HOME/bin/bazel version
$HOME/bin/bazel test \
//javascript/net/grpc/web/... \
//net/grpc/gateway/examples/...
# Run the bazel test command multiple times because of some flaky
# behavior with libssl.so
tries=15
set +e
for ((i=1;i<=$tries;i++));
do
$HOME/bin/bazel clean
$HOME/bin/bazel test --cache_test_results=no \
//javascript/net/grpc/web/... \
//net/grpc/gateway/examples/...
ret=$?
if [ $ret -eq 0 ]; then
break
elif [ $i -eq $tries ]; then
exit 1
fi
done
set -e
rm ./buildifier
rm ./bazel-"${BAZEL_VERSION}"-installer-linux-x86_64.sh
# Build the grpc-web npm package