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
This commit is contained in:
Craig Tiller 2021-10-06 07:43:59 -07:00 committed by GitHub
parent 0611f7c9b3
commit d1e01ac139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
77 changed files with 109 additions and 76 deletions

View File

@ -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__"])

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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"])

View File

@ -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"])

View File

@ -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")

View File

@ -19,7 +19,7 @@ load(
"grpc_cc_library",
)
licenses(["notice"]) # Apache v2
licenses(["notice"])
package(
default_visibility = ["//visibility:public"],

View File

@ -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",

View File

@ -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"])

View File

@ -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"])

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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",

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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 = [

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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",

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -22,7 +22,7 @@ grpc_package(
],
)
licenses(["notice"]) # Apache v2
licenses(["notice"])
grpc_cc_binary(
name = "low_level_ping_pong",

View File

@ -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")

View File

@ -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",

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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",

View File

@ -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",

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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",

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -20,7 +20,7 @@ package(
],
)
licenses(["notice"]) # Apache v2
licenses(["notice"])
load("//bazel:grpc_build_system.bzl", "grpc_py_binary")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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

View File

@ -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