diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh (renamed from tools/internal_ci/linux/grpc_bazel_on_foundry.sh) | 1 | ||||
-rw-r--r-- | tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh | 56 | ||||
-rwxr-xr-x | tools/run_tests/python_utils/port_server.py | 13 |
3 files changed, 69 insertions, 1 deletions
diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh index e328be8aab..c43ac0e708 100644 --- a/tools/internal_ci/linux/grpc_bazel_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh @@ -52,4 +52,5 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/asci-toolchain/nosla-debian8-clang-fl@sha256:aa20628a902f06a11a015caa94b0432eb60690de2d2525bd046b9eea046f5d8a" }' \ --crosstool_top=@bazel_toolchains//configs/debian8_clang/0.2.0/bazel_0.7.0:toolchain \ --define GRPC_PORT_ISOLATED_RUNTIME=1 \ + -c dbg \ -- //test/... diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh new file mode 100644 index 0000000000..b106b71a85 --- /dev/null +++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# Copyright 2017 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 + +# A temporary solution to give Kokoro credentials. +# The file name 4321_grpc-testing-service needs to match auth_credential in +# the build config. +mkdir -p ${KOKORO_KEYSTORE_DIR} +cp ${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json ${KOKORO_KEYSTORE_DIR}/4321_grpc-testing-service + +mkdir -p /tmpfs/tmp/bazel-canary +ln -f "${KOKORO_GFILE_DIR}/bazel-canary" /tmpfs/tmp/bazel-canary/bazel +chmod 755 "${KOKORO_GFILE_DIR}/bazel-canary" +export PATH="/tmpfs/tmp/bazel-canary:${PATH}" +# This should show /tmpfs/tmp/bazel-canary/bazel +which bazel +chmod +x "${KOKORO_GFILE_DIR}/bazel_wrapper.py" + +# change to grpc repo root +cd $(dirname $0)/../../.. + +source tools/internal_ci/helper_scripts/prepare_build_linux_rc + +"${KOKORO_GFILE_DIR}/bazel_wrapper.py" \ + --host_jvm_args=-Dbazel.DigestFunction=SHA1 \ + test --jobs="50" \ + --test_timeout="300,450,1200,3600" \ + --test_output=errors \ + --verbose_failures=true \ + --keep_going \ + --remote_accept_cached=true \ + --spawn_strategy=remote \ + --remote_local_fallback=false \ + --remote_timeout=3600 \ + --strategy=Javac=remote \ + --strategy=Closure=remote \ + --genrule_strategy=remote \ + --experimental_strict_action_env=true \ + --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/asci-toolchain/nosla-debian8-clang-fl@sha256:aa20628a902f06a11a015caa94b0432eb60690de2d2525bd046b9eea046f5d8a" }' \ + --crosstool_top=@bazel_toolchains//configs/debian8_clang/0.2.0/bazel_0.7.0:toolchain \ + --define GRPC_PORT_ISOLATED_RUNTIME=1 \ + -c opt \ + -- //test/... diff --git a/tools/run_tests/python_utils/port_server.py b/tools/run_tests/python_utils/port_server.py index 4fb5ca0e94..e8ac71af8d 100755 --- a/tools/run_tests/python_utils/port_server.py +++ b/tools/run_tests/python_utils/port_server.py @@ -57,6 +57,17 @@ pool = [] in_use = {} mu = threading.Lock() +# Cronet restricts the following ports to be used (see +# https://cs.chromium.org/chromium/src/net/base/port_util.cc). When one of these +# ports is used in a Cronet test, the test would fail (see issue #12149). These +# ports must be excluded from pool. +cronet_restricted_ports = [1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, + 42, 43, 53, 77, 79, 87, 95, 101, 102, 103, 104, 109, + 110, 111, 113, 115, 117, 119, 123, 135, 139, 143, + 179, 389, 465, 512, 513, 514, 515, 526, 530, 531, + 532, 540, 556, 563, 587, 601, 636, 993, 995, 2049, + 3659, 4045, 6000, 6665, 6666, 6667, 6668, 6669, 6697] + def can_connect(port): # this test is only really useful on unices where SO_REUSE_PORT is available # so on Windows, where this test is expensive, skip it @@ -84,7 +95,7 @@ def can_bind(port, proto): def refill_pool(max_timeout, req): """Scan for ports not marked for being in use""" - chk = list(range(1025, 32766)) + chk = [port for port in list(range(1025, 32766)) if port not in cronet_restricted_ports] random.shuffle(chk) for i in chk: if len(pool) > 100: break |