Skip to content

Commit

Permalink
Add license blurb to bzl_library_test.bzl and move blurb-less test da…
Browse files Browse the repository at this point in the history
…ta files to testdata subdir (#503)

Required by internal license checker.
  • Loading branch information
tetromino authored Apr 25, 2024
1 parent eff2e58 commit 9083873
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
14 changes: 7 additions & 7 deletions tests/bzl_library/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
)
14 changes: 14 additions & 0 deletions tests/bzl_library/bzl_library_test.bzl
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/bzl_library/c.bzl → tests/bzl_library/testdata/c.bzl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9083873

Please sign in to comment.