From 4ba7e8400a36cc6151b491fb189987eea371a4da Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Wed, 2 May 2018 11:50:33 -0700 Subject: [PATCH] Enable uploading RBE test results to BQ --- tools/internal_ci/linux/grpc_asan_on_foundry.sh | 1 + tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh | 2 ++ tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh | 2 +- tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh | 1 + tools/internal_ci/linux/grpc_msan_on_foundry.sh | 11 ++++++++++- tools/internal_ci/linux/grpc_tsan_on_foundry.sh | 2 +- tools/internal_ci/linux/grpc_ubsan_on_foundry.sh | 11 ++++++++++- .../linux/pull_request/grpc_bazel_on_foundry_dbg.sh | 1 - 8 files changed, 26 insertions(+), 5 deletions(-) diff --git a/tools/internal_ci/linux/grpc_asan_on_foundry.sh b/tools/internal_ci/linux/grpc_asan_on_foundry.sh index 2aebb65552e..791c56c0869 100644 --- a/tools/internal_ci/linux/grpc_asan_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_asan_on_foundry.sh @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +export UPLOAD_TEST_RESULTS=true EXTRA_FLAGS="--copt=-gmlt --strip=never --copt=-fsanitize=address --linkopt=-fsanitize=address --test_timeout=3600" github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}" diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh index 4e0937c37b5..3ca6d05d488 100755 --- a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh +++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh @@ -57,6 +57,8 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc if [ "$UPLOAD_TEST_RESULTS" != "" ] then + # Sleep to let ResultStore finish writing results before querying + sleep 60 python ./tools/run_tests/python_utils/upload_rbe_results.py fi diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh index ed5caa40230..192d9d1b2d0 100644 --- a/tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh +++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +export UPLOAD_TEST_RESULTS=true EXTRA_FLAGS="-c dbg --test_timeout=300,450,1200,3600 --runs_per_test_detects_flakes --runs_per_test=2" github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}" - diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh index 66f02a82ff9..6fb3c77892e 100644 --- a/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh +++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh @@ -13,5 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +export UPLOAD_TEST_RESULTS=true EXTRA_FLAGS="-c opt --test_timeout=300,450,1200,3600 --runs_per_test_detects_flakes --runs_per_test=2" github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}" diff --git a/tools/internal_ci/linux/grpc_msan_on_foundry.sh b/tools/internal_ci/linux/grpc_msan_on_foundry.sh index 390ca3428de..5e644793ad2 100644 --- a/tools/internal_ci/linux/grpc_msan_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_msan_on_foundry.sh @@ -61,4 +61,13 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc --action_env=LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \ --host_crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/debian8_clang/0.3.0/bazel_0.10.0:toolchain \ --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/experimental/debian8_clang/0.3.0/bazel_0.10.0/msan:msan_experimental_toolchain \ - -- //test/... + -- //test/... || FAILED="true" + +# Sleep to let ResultStore finish writing results before querying +sleep 60 +python ./tools/run_tests/python_utils/upload_rbe_results.py + +if [ "$FAILED" != "" ] +then + exit 1 +fi diff --git a/tools/internal_ci/linux/grpc_tsan_on_foundry.sh b/tools/internal_ci/linux/grpc_tsan_on_foundry.sh index aacb1ad4969..fafa1ceecb4 100644 --- a/tools/internal_ci/linux/grpc_tsan_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_tsan_on_foundry.sh @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +export UPLOAD_TEST_RESULTS=true EXTRA_FLAGS="--copt=-gmlt --strip=never --copt=-fsanitize=thread --linkopt=-fsanitize=thread --test_timeout=3600" github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}" - diff --git a/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh b/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh index ba50011e5b8..0f71ff27cf2 100644 --- a/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh @@ -57,4 +57,13 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc --copt=-fsanitize=undefined \ --linkopt=-fsanitize=undefined \ --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/experimental/debian8_clang/0.3.0/bazel_0.10.0/ubsan:ubsan_experimental_toolchain \ - -- //test/... + -- //test/... || FAILED="true" + +# Sleep to let ResultStore finish writing results before querying +sleep 60 +python ./tools/run_tests/python_utils/upload_rbe_results.py + +if [ "$FAILED" != "" ] +then + exit 1 +fi diff --git a/tools/internal_ci/linux/pull_request/grpc_bazel_on_foundry_dbg.sh b/tools/internal_ci/linux/pull_request/grpc_bazel_on_foundry_dbg.sh index 3ff569df470..8e2aaebaee7 100644 --- a/tools/internal_ci/linux/pull_request/grpc_bazel_on_foundry_dbg.sh +++ b/tools/internal_ci/linux/pull_request/grpc_bazel_on_foundry_dbg.sh @@ -15,4 +15,3 @@ EXTRA_FLAGS="-c dbg --test_timeout=300,450,1200,3600" github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}" -