Bazel: Fix testonly values in BUILD and .bzl files
According to the documentation [1], the expected values for testonly are True and False. Replace all the current usages of "1" with "True". [1] https://docs.bazel.build/versions/master/be/common-definitions.html Change-Id: I89417f6f9d56e126a6b05edeaaa946934799ab23
This commit is contained in:
parent
64a76378e3
commit
f86cc5eb4f
2
BUILD
2
BUILD
@ -110,7 +110,7 @@ API_DEPS = [
|
||||
|
||||
genrule2(
|
||||
name = "api",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = API_DEPS,
|
||||
outs = ["api.zip"],
|
||||
cmd = " && ".join([
|
||||
|
@ -2,7 +2,7 @@ load("//tools/bzl:java.bzl", "java_library2")
|
||||
|
||||
java_library(
|
||||
name = "lib",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
resource_strip_prefix = "resources",
|
||||
resources = ["//resources/com/google/gerrit/acceptance"],
|
||||
visibility = ["//visibility:public"],
|
||||
@ -55,7 +55,7 @@ java_library(
|
||||
|
||||
java_binary(
|
||||
name = "framework",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
main_class = "Dummy",
|
||||
visibility = ["//visibility:public"],
|
||||
runtime_deps = [":framework-lib"],
|
||||
@ -63,7 +63,7 @@ java_binary(
|
||||
|
||||
java_library2(
|
||||
name = "framework-lib",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
exported_deps = [
|
||||
"//java/com/google/gerrit/gpg",
|
||||
@ -129,7 +129,7 @@ load("//tools/bzl:javadoc.bzl", "java_doc")
|
||||
|
||||
java_doc(
|
||||
name = "framework-javadoc",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
libs = [":framework-lib"],
|
||||
pkgs = ["com.google.gerrit.acceptance"],
|
||||
title = "Gerrit Acceptance Test Framework Documentation",
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "common-data-test-util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "common-test-util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "restapi-test-util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
package(default_testonly = 1)
|
||||
package(default_testonly = True)
|
||||
|
||||
java_library(
|
||||
name = "testing",
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "gpg-test-util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
package(default_testonly = 1)
|
||||
package(default_testonly = True)
|
||||
|
||||
java_library(
|
||||
name = "testing",
|
||||
|
@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
|
||||
|
||||
java_library(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["*.java"]),
|
||||
deps = [
|
||||
"//java/com/google/gerrit/common:server",
|
||||
|
@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
|
||||
|
||||
java_library(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["*.java"]),
|
||||
deps = [
|
||||
"//java/com/google/gerrit/common:server",
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "project-test-util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "gerrit-test-util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
exports = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "truth",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -12,7 +12,7 @@ acceptance_tests(
|
||||
|
||||
java_library(
|
||||
name = "push_for_review",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ["AbstractPushForReview.java"],
|
||||
deps = [
|
||||
"//java/com/google/gerrit/acceptance:lib",
|
||||
@ -22,7 +22,7 @@ java_library(
|
||||
|
||||
java_library(
|
||||
name = "submodule_util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ["AbstractSubmoduleSubscription.java"],
|
||||
deps = ["//java/com/google/gerrit/acceptance:lib"],
|
||||
)
|
||||
|
@ -41,7 +41,7 @@ acceptance_tests(
|
||||
|
||||
java_library(
|
||||
name = "util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"AbstractReindexTests.java",
|
||||
"IndexUpgradeController.java",
|
||||
|
@ -12,7 +12,7 @@ acceptance_tests(
|
||||
|
||||
java_library(
|
||||
name = "util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"AbstractRestApiBindingsTest.java",
|
||||
],
|
||||
|
@ -9,7 +9,7 @@ acceptance_tests(
|
||||
|
||||
java_library(
|
||||
name = "util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"AccountAssert.java",
|
||||
"CapabilityInfo.java",
|
||||
|
@ -30,7 +30,7 @@ acceptance_tests(
|
||||
|
||||
java_library(
|
||||
name = "submit_util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = SUBMIT_UTIL_SRCS,
|
||||
deps = [
|
||||
"//java/com/google/gerrit/acceptance:lib",
|
||||
|
@ -40,7 +40,7 @@ java_library(
|
||||
|
||||
java_library(
|
||||
name = "push_tag_util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"AbstractPushTag.java",
|
||||
],
|
||||
|
@ -21,7 +21,7 @@ acceptance_tests(
|
||||
|
||||
java_library(
|
||||
name = "util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ["AbstractMailIT.java"],
|
||||
deps = DEPS + ["//java/com/google/gerrit/acceptance:lib"],
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ load("//javatests/com/google/gerrit/acceptance:tests.bzl", "acceptance_tests")
|
||||
|
||||
java_library(
|
||||
name = "util",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ["AbstractIndexTests.java"],
|
||||
deps = ["//java/com/google/gerrit/acceptance:lib"],
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ load("//tools/bzl:junit.bzl", "junit_tests")
|
||||
|
||||
java_library(
|
||||
name = "elasticsearch_test_utils",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"ElasticContainer.java",
|
||||
"ElasticTestUtils.java",
|
||||
|
@ -6,7 +6,7 @@ CUSTOM_TRUTH_SUBJECTS = glob([
|
||||
|
||||
java_library(
|
||||
name = "custom-truth-subjects",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = CUSTOM_TRUTH_SUBJECTS,
|
||||
deps = [
|
||||
"//java/com/google/gerrit/extensions:api",
|
||||
|
@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryAccountsTest.java"]
|
||||
|
||||
java_library(
|
||||
name = "abstract_query_tests",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ABSTRACT_QUERY_TEST,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryChangesTest.java"]
|
||||
|
||||
java_library(
|
||||
name = "abstract_query_tests",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ABSTRACT_QUERY_TEST,
|
||||
visibility = ["//visibility:public"],
|
||||
runtime_deps = ["//prolog:gerrit-prolog-common"],
|
||||
|
@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryGroupsTest.java"]
|
||||
|
||||
java_library(
|
||||
name = "abstract_query_tests",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ABSTRACT_QUERY_TEST,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryProjectsTest.java"]
|
||||
|
||||
java_library(
|
||||
name = "abstract_query_tests",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = ABSTRACT_QUERY_TEST,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
java_library(
|
||||
name = "testutil",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
|
@ -2,7 +2,7 @@ load("//lib/jgit:jgit.bzl", "jgit_dep")
|
||||
|
||||
java_library(
|
||||
name = "junit",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
|
||||
visibility = ["//visibility:public"],
|
||||
exports = [jgit_dep("@jgit-junit//jar")],
|
||||
|
@ -38,7 +38,7 @@ java_library(
|
||||
|
||||
java_library(
|
||||
name = "testcontainers-elasticsearch",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
data = ["//lib:LICENSE-testcontainers"],
|
||||
visibility = ["//visibility:public"],
|
||||
exports = ["@testcontainers-elasticsearch//jar"],
|
||||
|
@ -23,7 +23,7 @@ polygerrit_bundle(
|
||||
|
||||
bower_component_bundle(
|
||||
name = "test_components",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
deps = [
|
||||
"//lib/js:iron-test-helpers",
|
||||
"//lib/js:test-fixture",
|
||||
|
@ -37,13 +37,13 @@ DEPS = [
|
||||
|
||||
java_library(
|
||||
name = "classpath",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
runtime_deps = LIBS + PGMLIBS + DEPS,
|
||||
)
|
||||
|
||||
classpath_collector(
|
||||
name = "main_classpath_collect",
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
deps = LIBS + PGMLIBS + DEPS + TEST_DEPS +
|
||||
["//plugins/%s:%s__plugin" % (n, n) for n in CORE_PLUGINS + CUSTOM_PLUGINS] +
|
||||
["//plugins/%s:%s__plugin_test_deps" % (n, n) for n in CUSTOM_PLUGINS_TEST_DEPS],
|
||||
|
@ -50,7 +50,7 @@ def maven_package(
|
||||
srcs = api_targets,
|
||||
outs = ["api_install.sh"],
|
||||
executable = True,
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
)
|
||||
|
||||
if repository and url:
|
||||
@ -70,7 +70,7 @@ def maven_package(
|
||||
srcs = api_targets,
|
||||
outs = ["api_deploy.sh"],
|
||||
executable = True,
|
||||
testonly = 1,
|
||||
testonly = True,
|
||||
)
|
||||
|
||||
war_cmd = mvn_cmd[:]
|
||||
|
Loading…
Reference in New Issue
Block a user