Adds a bazel-rules-tests java_test rule for the tests under src/test/java/com/google/devtools/build/lib/bazel/rules

--
MOS_MIGRATED_REVID=106695490
diff --git a/src/test/java/com/google/devtools/build/lib/BUILD b/src/test/java/com/google/devtools/build/lib/BUILD
index 6be85f0..4be8cde 100644
--- a/src/test/java/com/google/devtools/build/lib/BUILD
+++ b/src/test/java/com/google/devtools/build/lib/BUILD
@@ -738,6 +738,28 @@
 )
 
 java_test(
+    name = "bazel-rules-tests",
+    srcs = glob([
+        "bazel/rules/**/*.java",
+    ]),
+    args = ["com.google.devtools.build.lib.AllTests"],
+    resources = glob(["bazel/rules/**/*.txt"]),
+    tags = ["rules"],
+    deps = [
+        ":foundations_testutil",
+        ":test_runner",
+        "//src/main/java/com/google/devtools/build/lib:bazel-core",
+        "//src/main/java/com/google/devtools/build/lib:events",
+        "//src/main/java/com/google/devtools/build/lib:util",
+        "//src/main/java/com/google/devtools/build/lib:vfs",
+        "//src/main/protobuf:crosstool_config_proto",
+        "//third_party:guava",
+        "//third_party:junit4",
+        "//third_party:truth",
+    ],
+)
+
+java_test(
     name = "repository_test",
     srcs = glob([
         "bazel/repository/*.java",