From d1e01ac139d60cc4ff8773ea011f1a1abe6ff31e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Oct 2021 07:43:59 -0700 Subject: [PATCH] Add a test for a (now-illegal) build file construct (#27602) * Add a test for a (now-illegal) build file construct * add to test suite! * fix * fix * fix syntax --- bazel/BUILD | 2 +- examples/cpp/compression/BUILD | 2 +- examples/cpp/helloworld/BUILD | 2 +- examples/cpp/keyvaluestore/BUILD | 2 +- examples/cpp/load_balancing/BUILD | 2 +- examples/cpp/metadata/BUILD | 2 +- examples/cpp/route_guide/BUILD | 2 +- examples/objective-c/BUILD | 2 +- examples/protos/BUILD | 2 +- examples/python/data_transmission/BUILD | 2 +- src/core/ext/transport/cronet/BUILD | 2 +- src/core/tsi/test_creds/BUILD | 2 +- src/objective-c/examples/BUILD | 2 +- src/objective-c/tests/BUILD | 2 +- src/proto/grpc/channelz/BUILD | 2 +- src/proto/grpc/core/BUILD | 2 +- src/proto/grpc/gcp/BUILD | 2 +- src/proto/grpc/health/v1/BUILD | 2 +- src/proto/grpc/http_over_grpc/BUILD | 2 +- src/proto/grpc/lb/v1/BUILD | 2 +- src/proto/grpc/reflection/v1alpha/BUILD | 2 +- src/proto/grpc/status/BUILD | 2 +- src/proto/grpc/testing/BUILD | 2 +- src/proto/grpc/testing/duplicate/BUILD | 2 +- src/proto/grpc/testing/xds/BUILD | 2 +- src/proto/grpc/testing/xds/v3/BUILD | 2 +- test/core/avl/BUILD | 2 +- test/core/backoff/BUILD | 2 +- test/core/bad_client/BUILD | 2 +- test/core/bad_connection/BUILD | 2 +- test/core/bad_ssl/BUILD | 2 +- test/core/channel/BUILD | 2 +- test/core/client_channel/resolvers/BUILD | 2 +- test/core/compression/BUILD | 2 +- test/core/debug/BUILD | 2 +- test/core/end2end/BUILD | 2 +- test/core/end2end/fuzzers/BUILD | 2 +- test/core/fling/BUILD | 2 +- test/core/gpr/BUILD | 2 +- test/core/gprpp/BUILD | 2 +- test/core/handshake/BUILD | 2 +- test/core/http/BUILD | 4 +-- test/core/iomgr/BUILD | 2 +- test/core/json/BUILD | 2 +- test/core/nanopb/BUILD | 2 +- test/core/network_benchmarks/BUILD | 2 +- test/core/security/BUILD | 2 +- test/core/security/etc/BUILD | 2 +- test/core/slice/BUILD | 2 +- test/core/surface/BUILD | 2 +- test/core/transport/BUILD | 2 +- test/core/transport/chttp2/BUILD | 2 +- test/core/tsi/BUILD | 2 +- test/core/tsi/alts/crypt/BUILD | 2 +- test/core/tsi/alts/fake_handshaker/BUILD | 2 +- test/core/tsi/alts/frame_protector/BUILD | 2 +- test/core/tsi/alts/handshaker/BUILD | 2 +- .../tsi/alts/zero_copy_frame_protector/BUILD | 2 +- test/core/util/BUILD | 2 +- test/cpp/client/BUILD | 2 +- test/cpp/codegen/BUILD | 2 +- test/cpp/common/BUILD | 2 +- test/cpp/ext/filters/census/BUILD | 2 +- test/cpp/grpclb/BUILD | 2 +- test/cpp/interop/BUILD | 2 +- test/cpp/microbenchmarks/BUILD | 2 +- test/cpp/naming/BUILD | 2 +- test/cpp/naming/utils/BUILD | 2 +- test/cpp/performance/BUILD | 2 +- test/cpp/qps/BUILD | 2 +- test/cpp/server/BUILD | 2 +- test/cpp/server/load_reporter/BUILD | 2 +- test/cpp/test/BUILD | 2 +- test/cpp/thread_manager/BUILD | 2 +- test/cpp/util/BUILD | 2 +- .../sanity/build_banned_constructs.sh | 31 +++++++++++++++++++ tools/run_tests/sanity/sanity_tests.yaml | 2 ++ 77 files changed, 109 insertions(+), 76 deletions(-) create mode 100755 tools/run_tests/sanity/build_banned_constructs.sh diff --git a/bazel/BUILD b/bazel/BUILD index c3c82c9c0c7..f94b9824360 100644 --- a/bazel/BUILD +++ b/bazel/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) package(default_visibility = ["//:__subpackages__"]) diff --git a/examples/cpp/compression/BUILD b/examples/cpp/compression/BUILD index 8df2ecb694f..15485ed6f01 100644 --- a/examples/cpp/compression/BUILD +++ b/examples/cpp/compression/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) cc_binary( name = "compression_client", diff --git a/examples/cpp/helloworld/BUILD b/examples/cpp/helloworld/BUILD index c9a0cc20504..eb0d57e5d0b 100644 --- a/examples/cpp/helloworld/BUILD +++ b/examples/cpp/helloworld/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) cc_binary( name = "greeter_client", diff --git a/examples/cpp/keyvaluestore/BUILD b/examples/cpp/keyvaluestore/BUILD index ac1fec2f908..b6c78395c53 100644 --- a/examples/cpp/keyvaluestore/BUILD +++ b/examples/cpp/keyvaluestore/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) cc_binary( name = "keyvaluestore_client", diff --git a/examples/cpp/load_balancing/BUILD b/examples/cpp/load_balancing/BUILD index 52c07fdda0c..b254eb942e4 100644 --- a/examples/cpp/load_balancing/BUILD +++ b/examples/cpp/load_balancing/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) cc_binary( name = "lb_server", diff --git a/examples/cpp/metadata/BUILD b/examples/cpp/metadata/BUILD index 90cb90c5eb8..d1848a96538 100644 --- a/examples/cpp/metadata/BUILD +++ b/examples/cpp/metadata/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) cc_binary( name = "metadata_client", diff --git a/examples/cpp/route_guide/BUILD b/examples/cpp/route_guide/BUILD index 6f93549fb0a..3f04558d370 100644 --- a/examples/cpp/route_guide/BUILD +++ b/examples/cpp/route_guide/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) cc_library( name = "route_guide_helper", diff --git a/examples/objective-c/BUILD b/examples/objective-c/BUILD index 965da49496b..2d9861b0e8d 100644 --- a/examples/objective-c/BUILD +++ b/examples/objective-c/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) package(default_visibility = ["//visibility:public"]) diff --git a/examples/protos/BUILD b/examples/protos/BUILD index 5418b88e6f8..911c868cf20 100644 --- a/examples/protos/BUILD +++ b/examples/protos/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) package(default_visibility = ["//visibility:public"]) diff --git a/examples/python/data_transmission/BUILD b/examples/python/data_transmission/BUILD index 2eefb7a3ed2..eaf2c109fe1 100644 --- a/examples/python/data_transmission/BUILD +++ b/examples/python/data_transmission/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) load("@grpc_python_dependencies//:requirements.bzl", "requirement") diff --git a/src/core/ext/transport/cronet/BUILD b/src/core/ext/transport/cronet/BUILD index 9c5848b2ab7..6ac15b3a229 100644 --- a/src/core/ext/transport/cronet/BUILD +++ b/src/core/ext/transport/cronet/BUILD @@ -19,7 +19,7 @@ load( "grpc_cc_library", ) -licenses(["notice"]) # Apache v2 +licenses(["notice"]) package( default_visibility = ["//visibility:public"], diff --git a/src/core/tsi/test_creds/BUILD b/src/core/tsi/test_creds/BUILD index 94bb5d4bdef..1ff24718ecf 100644 --- a/src/core/tsi/test_creds/BUILD +++ b/src/core/tsi/test_creds/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) exports_files([ "ca.pem", diff --git a/src/objective-c/examples/BUILD b/src/objective-c/examples/BUILD index 73f0cb7a88d..a080aeff0ad 100644 --- a/src/objective-c/examples/BUILD +++ b/src/objective-c/examples/BUILD @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # 3-clause BSD +licenses(["notice"]) package(default_visibility = ["//visibility:public"]) diff --git a/src/objective-c/tests/BUILD b/src/objective-c/tests/BUILD index f029984babb..ec59473f4ba 100644 --- a/src/objective-c/tests/BUILD +++ b/src/objective-c/tests/BUILD @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) package(default_visibility = ["//visibility:public"]) diff --git a/src/proto/grpc/channelz/BUILD b/src/proto/grpc/channelz/BUILD index 6aa9c12385f..03a8ce1b9a9 100644 --- a/src/proto/grpc/channelz/BUILD +++ b/src/proto/grpc/channelz/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("@rules_proto//proto:defs.bzl", "proto_library") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") diff --git a/src/proto/grpc/core/BUILD b/src/proto/grpc/core/BUILD index c79e15d639b..073c68e786d 100644 --- a/src/proto/grpc/core/BUILD +++ b/src/proto/grpc/core/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") load("//bazel:python_rules.bzl", "py_proto_library") diff --git a/src/proto/grpc/gcp/BUILD b/src/proto/grpc/gcp/BUILD index 96e287f7009..fd7c7b4985f 100644 --- a/src/proto/grpc/gcp/BUILD +++ b/src/proto/grpc/gcp/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("@rules_proto//proto:defs.bzl", "proto_library") diff --git a/src/proto/grpc/health/v1/BUILD b/src/proto/grpc/health/v1/BUILD index 9caa531c5a7..702f5b0ec5a 100644 --- a/src/proto/grpc/health/v1/BUILD +++ b/src/proto/grpc/health/v1/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("@rules_proto//proto:defs.bzl", "proto_library") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") diff --git a/src/proto/grpc/http_over_grpc/BUILD b/src/proto/grpc/http_over_grpc/BUILD index 0fb10331bfa..c27ad5ee2c7 100644 --- a/src/proto/grpc/http_over_grpc/BUILD +++ b/src/proto/grpc/http_over_grpc/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package( name = "http_over_grpc", diff --git a/src/proto/grpc/lb/v1/BUILD b/src/proto/grpc/lb/v1/BUILD index 44ffebe18a2..882c8a56b9a 100644 --- a/src/proto/grpc/lb/v1/BUILD +++ b/src/proto/grpc/lb/v1/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("@rules_proto//proto:defs.bzl", "proto_library") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") diff --git a/src/proto/grpc/reflection/v1alpha/BUILD b/src/proto/grpc/reflection/v1alpha/BUILD index e7824558fa1..cb8e8c5b8bc 100644 --- a/src/proto/grpc/reflection/v1alpha/BUILD +++ b/src/proto/grpc/reflection/v1alpha/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("@rules_proto//proto:defs.bzl", "proto_library") load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") diff --git a/src/proto/grpc/status/BUILD b/src/proto/grpc/status/BUILD index ed8c29caaf7..cd4501a2b52 100644 --- a/src/proto/grpc/status/BUILD +++ b/src/proto/grpc/status/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD index c67a7f81abc..9d462f02a49 100644 --- a/src/proto/grpc/testing/BUILD +++ b/src/proto/grpc/testing/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("@grpc_python_dependencies//:requirements.bzl", "requirement") load("@rules_proto//proto:defs.bzl", "proto_library") diff --git a/src/proto/grpc/testing/duplicate/BUILD b/src/proto/grpc/testing/duplicate/BUILD index d7902c1c36b..90756ad569c 100644 --- a/src/proto/grpc/testing/duplicate/BUILD +++ b/src/proto/grpc/testing/duplicate/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") diff --git a/src/proto/grpc/testing/xds/BUILD b/src/proto/grpc/testing/xds/BUILD index 5dd57959314..90f114dd912 100644 --- a/src/proto/grpc/testing/xds/BUILD +++ b/src/proto/grpc/testing/xds/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") diff --git a/src/proto/grpc/testing/xds/v3/BUILD b/src/proto/grpc/testing/xds/v3/BUILD index 0d79e5ef1a5..c6f15dfe6f8 100644 --- a/src/proto/grpc/testing/xds/v3/BUILD +++ b/src/proto/grpc/testing/xds/v3/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library") load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library") diff --git a/test/core/avl/BUILD b/test/core/avl/BUILD index d47cbdae511..f8108b62a84 100644 --- a/test/core/avl/BUILD +++ b/test/core/avl/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/avl") diff --git a/test/core/backoff/BUILD b/test/core/backoff/BUILD index 38020cc9bbe..1d0689e3a0e 100644 --- a/test/core/backoff/BUILD +++ b/test/core/backoff/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) package( features = [ diff --git a/test/core/bad_client/BUILD b/test/core/bad_client/BUILD index 22879c0efc6..096582f8f10 100644 --- a/test/core/bad_client/BUILD +++ b/test/core/bad_client/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/bad_client") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load(":generate_tests.bzl", "grpc_bad_client_tests") diff --git a/test/core/bad_connection/BUILD b/test/core/bad_connection/BUILD index 8111c7e2cac..d2e15b92339 100644 --- a/test/core/bad_connection/BUILD +++ b/test/core/bad_connection/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/bad_connection") diff --git a/test/core/bad_ssl/BUILD b/test/core/bad_ssl/BUILD index 757d86c8357..3bf44cb3cd1 100644 --- a/test/core/bad_ssl/BUILD +++ b/test/core/bad_ssl/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/bad_ssl") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load(":generate_tests.bzl", "grpc_bad_ssl_tests") diff --git a/test/core/channel/BUILD b/test/core/channel/BUILD index 88ddea93436..86897b4999a 100644 --- a/test/core/channel/BUILD +++ b/test/core/channel/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/channel") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_cc_test( name = "channel_args_test", diff --git a/test/core/client_channel/resolvers/BUILD b/test/core/client_channel/resolvers/BUILD index 5707abe8ff9..b50f4373eba 100644 --- a/test/core/client_channel/resolvers/BUILD +++ b/test/core/client_channel/resolvers/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/client_channel/resolvers") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_cc_test( name = "dns_resolver_connectivity_using_ares_test", diff --git a/test/core/compression/BUILD b/test/core/compression/BUILD index 81666f8e556..94ba177416b 100644 --- a/test/core/compression/BUILD +++ b/test/core/compression/BUILD @@ -17,7 +17,7 @@ load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_package(name = "test/core/compression") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_cc_test( name = "algorithm_test", diff --git a/test/core/debug/BUILD b/test/core/debug/BUILD index 0274bcb7c4a..62d4cb3daad 100644 --- a/test/core/debug/BUILD +++ b/test/core/debug/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/debug") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_cc_test( name = "stats_test", diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD index d173b209897..801c5591f7a 100644 --- a/test/core/end2end/BUILD +++ b/test/core/end2end/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/end2end") diff --git a/test/core/end2end/fuzzers/BUILD b/test/core/end2end/fuzzers/BUILD index 4b450dce47b..85961353fb2 100644 --- a/test/core/end2end/fuzzers/BUILD +++ b/test/core/end2end/fuzzers/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/end2end/fuzzers") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") diff --git a/test/core/fling/BUILD b/test/core/fling/BUILD index d037142b545..a1ebec9c564 100644 --- a/test/core/fling/BUILD +++ b/test/core/fling/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/fling") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") diff --git a/test/core/gpr/BUILD b/test/core/gpr/BUILD index 753a17de36c..f9d2392cd2a 100644 --- a/test/core/gpr/BUILD +++ b/test/core/gpr/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/gpr") diff --git a/test/core/gprpp/BUILD b/test/core/gprpp/BUILD index a4957c67f00..12d99c62261 100644 --- a/test/core/gprpp/BUILD +++ b/test/core/gprpp/BUILD @@ -15,7 +15,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") load("//bazel:custom_exec_properties.bzl", "LARGE_MACHINE") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/gprpp") diff --git a/test/core/handshake/BUILD b/test/core/handshake/BUILD index 8ead4083739..49ff6388eec 100644 --- a/test/core/handshake/BUILD +++ b/test/core/handshake/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/handshake") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_cc_test( name = "client_ssl_test", diff --git a/test/core/http/BUILD b/test/core/http/BUILD index 219eaf40222..e1ffdd7e4d5 100644 --- a/test/core/http/BUILD +++ b/test/core/http/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/http") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") @@ -60,7 +60,7 @@ grpc_fuzzer( # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") diff --git a/test/core/iomgr/BUILD b/test/core/iomgr/BUILD index 9fa7c57d371..998cd1c182c 100644 --- a/test/core/iomgr/BUILD +++ b/test/core/iomgr/BUILD @@ -15,7 +15,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") load("//bazel:custom_exec_properties.bzl", "LARGE_MACHINE") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") diff --git a/test/core/json/BUILD b/test/core/json/BUILD index ab5b002516d..5ad82ced2da 100644 --- a/test/core/json/BUILD +++ b/test/core/json/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/json") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") diff --git a/test/core/nanopb/BUILD b/test/core/nanopb/BUILD index a7c2c1784cf..ce827545ba4 100644 --- a/test/core/nanopb/BUILD +++ b/test/core/nanopb/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/nanopb") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") diff --git a/test/core/network_benchmarks/BUILD b/test/core/network_benchmarks/BUILD index 04dcd1107a1..259cb7952ad 100644 --- a/test/core/network_benchmarks/BUILD +++ b/test/core/network_benchmarks/BUILD @@ -22,7 +22,7 @@ grpc_package( ], ) -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_cc_binary( name = "low_level_ping_pong", diff --git a/test/core/security/BUILD b/test/core/security/BUILD index 613fcb82679..68907f29f58 100644 --- a/test/core/security/BUILD +++ b/test/core/security/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/security") diff --git a/test/core/security/etc/BUILD b/test/core/security/etc/BUILD index 480b3fe22e9..d0410537b9f 100644 --- a/test/core/security/etc/BUILD +++ b/test/core/security/etc/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) exports_files([ "bundle.pem", diff --git a/test/core/slice/BUILD b/test/core/slice/BUILD index 22994202fcc..da209fb4f61 100644 --- a/test/core/slice/BUILD +++ b/test/core/slice/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc grpc_package(name = "test/core/slice") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") diff --git a/test/core/surface/BUILD b/test/core/surface/BUILD index e3b5165a329..3307af149dc 100644 --- a/test/core/surface/BUILD +++ b/test/core/surface/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/surface") diff --git a/test/core/transport/BUILD b/test/core/transport/BUILD index 4eceba322e9..6f99db884a3 100644 --- a/test/core/transport/BUILD +++ b/test/core/transport/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/transport") diff --git a/test/core/transport/chttp2/BUILD b/test/core/transport/chttp2/BUILD index ad6709a7462..e4411225b85 100644 --- a/test/core/transport/chttp2/BUILD +++ b/test/core/transport/chttp2/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/transport/chttp2") diff --git a/test/core/tsi/BUILD b/test/core/tsi/BUILD index 6ac2d40cbfc..50f86a21742 100644 --- a/test/core/tsi/BUILD +++ b/test/core/tsi/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package( name = "test/core/tsi", diff --git a/test/core/tsi/alts/crypt/BUILD b/test/core/tsi/alts/crypt/BUILD index 767368a2f80..1883219392c 100644 --- a/test/core/tsi/alts/crypt/BUILD +++ b/test/core/tsi/alts/crypt/BUILD @@ -14,7 +14,7 @@ # load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package( name = "test/core/tsi/alts/crypt", diff --git a/test/core/tsi/alts/fake_handshaker/BUILD b/test/core/tsi/alts/fake_handshaker/BUILD index 44f57c41969..e4c8e0001ef 100644 --- a/test/core/tsi/alts/fake_handshaker/BUILD +++ b/test/core/tsi/alts/fake_handshaker/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_package", "grpc_proto_library") diff --git a/test/core/tsi/alts/frame_protector/BUILD b/test/core/tsi/alts/frame_protector/BUILD index 1e3d16df02c..39cc825bc9c 100644 --- a/test/core/tsi/alts/frame_protector/BUILD +++ b/test/core/tsi/alts/frame_protector/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/tsi/alts/frame_protector") diff --git a/test/core/tsi/alts/handshaker/BUILD b/test/core/tsi/alts/handshaker/BUILD index 0f8e6259a93..29a366aa7a6 100644 --- a/test/core/tsi/alts/handshaker/BUILD +++ b/test/core/tsi/alts/handshaker/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/tsi/alts/handshaker") diff --git a/test/core/tsi/alts/zero_copy_frame_protector/BUILD b/test/core/tsi/alts/zero_copy_frame_protector/BUILD index 191e44489d6..6f8cb649055 100644 --- a/test/core/tsi/alts/zero_copy_frame_protector/BUILD +++ b/test/core/tsi/alts/zero_copy_frame_protector/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/core/tsi/alts/zero_copy_frame_protector") diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 6bfbf7fcbff..d9884d5a011 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -14,7 +14,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package( name = "test/core/util", diff --git a/test/cpp/client/BUILD b/test/cpp/client/BUILD index c62c6332dbc..af0d86d5968 100644 --- a/test/cpp/client/BUILD +++ b/test/cpp/client/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/codegen/BUILD b/test/cpp/codegen/BUILD index b7bad5f67e4..560f5128e59 100644 --- a/test/cpp/codegen/BUILD +++ b/test/cpp/codegen/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_test", "grpc_package", "grpc_sh_test") diff --git a/test/cpp/common/BUILD b/test/cpp/common/BUILD index 8b2126042fb..1e25f28d762 100644 --- a/test/cpp/common/BUILD +++ b/test/cpp/common/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/ext/filters/census/BUILD b/test/cpp/ext/filters/census/BUILD index 62477a8498c..ffb4cc319c7 100644 --- a/test/cpp/ext/filters/census/BUILD +++ b/test/cpp/ext/filters/census/BUILD @@ -15,7 +15,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") load("//bazel:cc_grpc_library.bzl", "cc_grpc_library") -licenses(["notice"]) # Apache v2 +licenses(["notice"]) grpc_package(name = "test/cpp/ext/filters/census") diff --git a/test/cpp/grpclb/BUILD b/test/cpp/grpclb/BUILD index f9384e11236..b9203e7d904 100644 --- a/test/cpp/grpclb/BUILD +++ b/test/cpp/grpclb/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/interop/BUILD b/test/cpp/interop/BUILD index 85a84a70d6d..85f0bef13f0 100644 --- a/test/cpp/interop/BUILD +++ b/test/cpp/interop/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD index e39c444549b..6b52891fae4 100644 --- a/test/cpp/microbenchmarks/BUILD +++ b/test/cpp/microbenchmarks/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/naming/BUILD b/test/cpp/naming/BUILD index b35c37c0349..85bb419c43c 100644 --- a/test/cpp/naming/BUILD +++ b/test/cpp/naming/BUILD @@ -20,7 +20,7 @@ package( ], ) -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_py_binary") load(":generate_resolver_component_tests.bzl", "generate_resolver_component_tests") diff --git a/test/cpp/naming/utils/BUILD b/test/cpp/naming/utils/BUILD index 8781177fc34..10af8bf3b59 100644 --- a/test/cpp/naming/utils/BUILD +++ b/test/cpp/naming/utils/BUILD @@ -20,7 +20,7 @@ package( ], ) -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_py_binary") diff --git a/test/cpp/performance/BUILD b/test/cpp/performance/BUILD index 9d22564dc50..04506a14d8b 100644 --- a/test/cpp/performance/BUILD +++ b/test/cpp/performance/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/qps/BUILD b/test/cpp/qps/BUILD index 6fdcfd0d407..c856a50506e 100644 --- a/test/cpp/qps/BUILD +++ b/test/cpp/qps/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") load("//test/cpp/qps:qps_benchmark_script.bzl", "json_run_localhost_batch", "qps_json_driver_batch") diff --git a/test/cpp/server/BUILD b/test/cpp/server/BUILD index 549c859162c..505a0f2b451 100644 --- a/test/cpp/server/BUILD +++ b/test/cpp/server/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/server/load_reporter/BUILD b/test/cpp/server/load_reporter/BUILD index 846475a7b66..272b116e2f6 100644 --- a/test/cpp/server/load_reporter/BUILD +++ b/test/cpp/server/load_reporter/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/test/BUILD b/test/cpp/test/BUILD index 13d816c49fa..92b3159185f 100644 --- a/test/cpp/test/BUILD +++ b/test/cpp/test/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/thread_manager/BUILD b/test/cpp/thread_manager/BUILD index 2b1ef7a90af..2f8ca7c37c3 100644 --- a/test/cpp/thread_manager/BUILD +++ b/test/cpp/thread_manager/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index f2f46da79a8..897dd08758b 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -licenses(["notice"]) # Apache v2 +licenses(["notice"]) load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") diff --git a/tools/run_tests/sanity/build_banned_constructs.sh b/tools/run_tests/sanity/build_banned_constructs.sh new file mode 100755 index 00000000000..9286fbccec7 --- /dev/null +++ b/tools/run_tests/sanity/build_banned_constructs.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# Copyright 2019 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 -e + +cd "$(dirname "$0")/../../.." + +# +# Prevent the use of single line comments after license clauses, since this +# chokes the internal import process. +# + +regex='^licenses\(.*#' +for dir in bazel examples src test tools; do + for file in BUILD BUILD.bazel; do + git grep -EIrn "$regex" "$dir/**$file" | diff - /dev/null + done +done + diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml index 77826d6a29c..712b94c0139 100644 --- a/tools/run_tests/sanity/sanity_tests.yaml +++ b/tools/run_tests/sanity/sanity_tests.yaml @@ -39,3 +39,5 @@ cpu_cost: 1000 - script: tools/distrib/check_protobuf_pod_version.sh - script: tools/distrib/check_boringssl_prefix_symbol.sh +- script: tools/run_tests/sanity/build_banned_constructs.sh +