Add license blurb to bzl_library_test.bzl and move blurb-less test data files to testdata subdir (#503)

Required by internal license checker.
This commit is contained in:
Alexandre Rostovtsev 2024-04-25 17:15:11 -04:00 committed by GitHub
parent eff2e58cf3
commit 908387347d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 23 additions and 9 deletions

View File

@ -3,17 +3,17 @@ load(":bzl_library_test.bzl", "bzl_library_test")
filegroup(
name = "a",
srcs = ["a.bzl"],
srcs = ["testdata/a.bzl"],
)
bzl_library(
name = "b",
srcs = ["b.bzl"],
srcs = ["testdata/b.bzl"],
)
bzl_library(
name = "c",
srcs = ["c.bzl"],
srcs = ["testdata/c.bzl"],
deps = [
":a",
":b",
@ -22,11 +22,11 @@ bzl_library(
bzl_library_test(
name = "bzl_library_test",
expected_srcs = ["c.bzl"],
expected_srcs = ["testdata/c.bzl"],
expected_transitive_srcs = [
"a.bzl",
"b.bzl",
"c.bzl",
"testdata/a.bzl",
"testdata/b.bzl",
"testdata/c.bzl",
],
target_under_test = ":c",
)

View File

@ -1,3 +1,17 @@
# Copyright 2024 The Bazel Authors. All rights reserved.
#
# 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.
"""Unit tests for bzl_library"""
load("//:bzl_library.bzl", "StarlarkLibraryInfo")

View File

@ -1,6 +1,6 @@
"""c.bzl, standin' on the shoulder of giants"""
load(":a.bzl", "A")
load(":b.bzl", "B")
load(":testdata/a.bzl", "A")
load(":testdata/b.bzl", "B")
C = A + B