From 7eb3dc2ccc18bce78567b26ef9dfb852978cfa27 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 10 Dec 2019 16:55:08 -0800 Subject: [PATCH] Run grpc_tools tests under Bazel --- src/python/grpcio_tests/tests/unit/BUILD.bazel | 3 +-- tools/distrib/python/grpcio_tools/grpc_tools/BUILD | 4 +--- tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/python/grpcio_tests/tests/unit/BUILD.bazel b/src/python/grpcio_tests/tests/unit/BUILD.bazel index 93bda6cf13b..28e2d85a823 100644 --- a/src/python/grpcio_tests/tests/unit/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/BUILD.bazel @@ -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", diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/BUILD b/tools/distrib/python/grpcio_tools/grpc_tools/BUILD index d9822e100bf..649c8f812df 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/BUILD +++ b/tools/distrib/python/grpcio_tools/grpc_tools/BUILD @@ -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", diff --git a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh index fef8c8fa9f4..3ae244a9753 100755 --- a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh +++ b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh @@ -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}