mirror of https://github.com/grpc/grpc.git
[bazelified tests] Bazelify tests from "linux/grpc_bazel_build" and make the original test job a noop. (#34429)
Bazelify tests from "linux/grpc_bazel_build" kokoro job by creating 3 bazelified tests - "build with strict warning", "build with no_xds=True" and "build with no_xds=True negative test". - also make the original "linux/grpc_bazel_build" kokoro job a no-op (since bazelified tests now provide the same coverage).pull/34444/head
parent
c48250dc1a
commit
60f25c289b
9 changed files with 171 additions and 30 deletions
@ -0,0 +1,31 @@ |
||||
#!/bin/bash |
||||
# Copyright 2023 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
set -ex |
||||
|
||||
ARCHIVE_WITH_SUBMODULES="$1" |
||||
shift |
||||
|
||||
# Extract grpc repo archive |
||||
tar -xopf ${ARCHIVE_WITH_SUBMODULES} |
||||
cd grpc |
||||
|
||||
# Override the "do not detect toolchain" setting that was set |
||||
# by the .bazelrc configuration for the remote build. |
||||
# TODO(jtattermusch): find a better solution to avoid breaking toolchain detection. |
||||
export BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0 |
||||
|
||||
# Run command passed as args |
||||
"$@" |
@ -0,0 +1,19 @@ |
||||
#!/bin/bash |
||||
# Copyright 2023 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
set -ex |
||||
|
||||
# Test that builds with --define=grpc_no_xds=true work. |
||||
tools/bazel build //test/cpp/end2end:end2end_test --define=grpc_no_xds=true |
@ -0,0 +1,24 @@ |
||||
#!/bin/bash |
||||
# Copyright 2023 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
set -ex |
||||
|
||||
# Ensure that tests that require XDS do not build with --define=grpc_no_xds=true |
||||
EXIT_CODE=0 |
||||
bazel build //test/cpp/end2end/xds:xds_end2end_test --define=grpc_no_xds=true || EXIT_CODE=$? |
||||
if [ $EXIT_CODE -eq 0 ]; then |
||||
echo "FAILED: Building xds_end2end_test succeeded even with --define=grpc_no_xds=true" |
||||
exit 1 |
||||
fi |
@ -0,0 +1,28 @@ |
||||
#!/bin/bash |
||||
# Copyright 2023 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
set -ex |
||||
|
||||
tools/bazel \ |
||||
build \ |
||||
--define=use_strict_warning=true \ |
||||
-- \ |
||||
:all \ |
||||
//src/core/... \ |
||||
//src/compiler/... \ |
||||
//test/... \ |
||||
//examples/... \ |
||||
-//examples/android/binder/... |
||||
|
Loading…
Reference in new issue