Switch to config-driven style

pull/20938/head
Richard Belleville 5 years ago
parent c188f7ce56
commit a08da012d2
  1. 58
      src/python/grpcio_tests/tests/unit/BUILD.bazel
  2. 5
      src/python/grpcio_tests/tests/unit/_single_threaded_unary_stream_test_runner.sh
  3. 2
      tools/bazel.rc
  4. 7
      tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh

@ -84,39 +84,29 @@ py_library(
)
[
[
py2and3_test(
name=test_file_name[:-3],
size="small",
srcs=[test_file_name],
main=test_file_name,
deps=[
"//src/python/grpcio/grpc:grpcio",
":resources",
":test_common",
":thread_pool",
":_exit_scenarios",
":_server_shutdown_scenarios",
":_from_grpc_import_star",
":_tcp_proxy",
":_signal_client",
"//src/python/grpcio_tests/tests/unit/framework/common",
"//src/python/grpcio_tests/tests/testing",
"//external:six"
],
imports=["../../",],
data=[
"//src/python/grpcio_tests/tests/unit/credentials",
],
),
sh_test(
name = test_file_name[:-3] + ".single_threaded_unary_stream",
data = ["{}.python3".format(test_file_name[:-3])],
args = ["{}.python3".format(test_file_name[:-3])],
size = "small",
srcs = ["_single_threaded_unary_stream_test_runner.sh"]
)
]
for test_file_name in GRPCIO_TESTS_UNIT
py2and3_test(
name=test_file_name[:-3],
size="small",
srcs=[test_file_name],
main=test_file_name,
deps=[
"//src/python/grpcio/grpc:grpcio",
":resources",
":test_common",
":thread_pool",
":_exit_scenarios",
":_server_shutdown_scenarios",
":_from_grpc_import_star",
":_tcp_proxy",
":_signal_client",
"//src/python/grpcio_tests/tests/unit/framework/common",
"//src/python/grpcio_tests/tests/testing",
"//external:six"
],
imports=["../../",],
data=[
"//src/python/grpcio_tests/tests/unit/credentials",
],
) for test_file_name in GRPCIO_TESTS_UNIT
]

@ -1,5 +0,0 @@
#!/bin/bash
export GRPC_SINGLE_THREADED_UNARY_STREAM=true
find . -name "$1" -exec {} \;

@ -86,3 +86,5 @@ build:basicprof --copt=-DNDEBUG
build:basicprof --copt=-O2
build:basicprof --copt=-DGRPC_BASIC_PROFILER
build:basicprof --copt=-DGRPC_TIMERS_RDTSC
build:python_single_threaded_unary_stream --test_env="GRPC_SINGLE_THREADED_UNARY_STREAM=true"

@ -24,8 +24,11 @@ git clone /var/local/jenkins/grpc /var/local/git/grpc
&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
${name}')
cd /var/local/git/grpc/test
bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //src/python/...
bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //examples/python/...
TEST_TARGETS="//src/python/... //examples/python/..."
BAZEL_FLAGS="--spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors"
bazel test ${BAZEL_FLAGS} ${TEST_TARGETS}
bazel test --config=python_single_threaded_unary_stream ${BAZEL_FLAGS} ${TEST_TARGETS}
# TODO(https://github.com/grpc/grpc/issues/19854): Move this to a new Kokoro
# job.

Loading…
Cancel
Save