Add license blurb to bzl_library_test.bzl and move blurb-less test data files to testdata subdir (#503)
Required by internal license checker.
diff --git a/tests/bzl_library/BUILD b/tests/bzl_library/BUILD
index 6f8ae5c..72a4b9c 100644
--- a/tests/bzl_library/BUILD
+++ b/tests/bzl_library/BUILD
@@ -3,17 +3,17 @@
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_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",
)
diff --git a/tests/bzl_library/bzl_library_test.bzl b/tests/bzl_library/bzl_library_test.bzl
index 1e01a29..64d06dc 100644
--- a/tests/bzl_library/bzl_library_test.bzl
+++ b/tests/bzl_library/bzl_library_test.bzl
@@ -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")
diff --git a/tests/bzl_library/c.bzl b/tests/bzl_library/c.bzl
deleted file mode 100644
index 1380ece..0000000
--- a/tests/bzl_library/c.bzl
+++ /dev/null
@@ -1,6 +0,0 @@
-"""c.bzl, standin' on the shoulder of giants"""
-
-load(":a.bzl", "A")
-load(":b.bzl", "B")
-
-C = A + B
diff --git a/tests/bzl_library/a.bzl b/tests/bzl_library/testdata/a.bzl
similarity index 100%
rename from tests/bzl_library/a.bzl
rename to tests/bzl_library/testdata/a.bzl
diff --git a/tests/bzl_library/b.bzl b/tests/bzl_library/testdata/b.bzl
similarity index 100%
rename from tests/bzl_library/b.bzl
rename to tests/bzl_library/testdata/b.bzl
diff --git a/tests/bzl_library/testdata/c.bzl b/tests/bzl_library/testdata/c.bzl
new file mode 100644
index 0000000..c1fbba7
--- /dev/null
+++ b/tests/bzl_library/testdata/c.bzl
@@ -0,0 +1,6 @@
+"""c.bzl, standin' on the shoulder of giants"""
+
+load(":testdata/a.bzl", "A")
+load(":testdata/b.bzl", "B")
+
+C = A + B