Documentation: check in (js_)licenses.txt

Add a test that ensures that the checked in version is up to date.

The license generation is tied closely to the Bazel build and the
layout of the Gerrit source tree.

By checking in the license files, alternative builds (such as the
Google internal build) do not have to replicate the license
generation step, or rerun the upstream Gerrit bazel build.

Change-Id: I500717e38de6c337ce552815e46562648df48b2f
diff --git a/Documentation/BUILD b/Documentation/BUILD
index 368e929..52ab7a8 100644
--- a/Documentation/BUILD
+++ b/Documentation/BUILD
@@ -56,9 +56,20 @@
     ],
 )
 
+sh_test(
+    name = "check_licenses",
+    srcs = ["check_licenses_test.sh"],
+    data = [
+        "js_licenses.gen.txt",
+        "js_licenses.txt",
+        "licenses.gen.txt",
+        "licenses.txt",
+    ],
+)
+
 DOC_DIR = "Documentation"
 
-SRCS = glob(["*.txt"]) + [":licenses.txt"]
+SRCS = glob(["*.txt"])
 
 genrule(
     name = "index",