Skip to content

Commit

Permalink
Temporarily run bazel test multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Mar 20, 2019
1 parent f9bfe72 commit ef94d2e
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions scripts/kokoro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef94d2e

Please sign in to comment.