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