Run grpc_tools tests under Bazel

pull/21504/head
Richard Belleville 5 years ago
parent 12cf83fd70
commit 7eb3dc2ccc
  1. 3
      src/python/grpcio_tests/tests/unit/BUILD.bazel
  2. 4
      tools/distrib/python/grpcio_tools/grpc_tools/BUILD
  3. 2
      tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh

@ -89,8 +89,6 @@ py_library(
srcs = [test_file_name],
data = [
"//src/python/grpcio_tests/tests/unit/credentials",
# TODO: Filegroup?
"//src/python/grpcio_tests/unit:data/foo/bar.proto",
],
imports = ["../../"],
main = test_file_name,
@ -112,6 +110,7 @@ py_library(
for test_file_name in GRPCIO_TESTS_UNIT
]
# TODO: Somehow incorporate into setup.py workflow.
py2and3_test(
name = "_dynamic_stubs_test",
size = "small",

@ -3,13 +3,11 @@ package(default_visibility = ["//visibility:public"])
load("//bazel:cython_library.bzl", "pyx_library")
load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
# TODO: Move this build file up a directory to ensure that this
# points to '.', not a directory above the package root.
NON_BAZEL_ROOT = "../"
# TODO: Move BUILD file up a directory
cc_library(
# TODO: Better name?
name = "protoc_lib",

@ -24,7 +24,7 @@ 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
TEST_TARGETS="//src/python/... //examples/python/..."
TEST_TARGETS="//src/python/... //tools/distrib/python/grpcio_tools/... //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}

Loading…
Cancel
Save