gerrit/gerrit-acceptance-framework/BUILD
Dave Borowitz 262857f297 Clean up PreviewSubmit and tests
* Fix Eclipse warnings about unclosed resources and missing case blocks.
* Use Jimfs instead of a real file on the filesystem for storing
  temporary zip files. This is a moderate rewrite to use NIO, because
  ZipFile doesn't support Paths.
* Return ObjectId in the fetchFromBundles map. Using RevObjects after
  the lifetime of their RevWalks can lead to difficult-to-debug errors,
  and in this case we don't need anything but the ID.
* Rename assertRevTrees to assertTrees, since it no longer refers to
  RevTrees.
* Add convenience method to run SubmitPreview in a try-with-resources
  block and return the Map result.
* Run google-java-format over all affected files.

Change-Id: I251f390f81cb3372e5b3243d6fbe7e2365bd2dcb
2017-02-22 11:57:10 -05:00

77 lines
2.0 KiB
Python

load("//tools/bzl:java.bzl", "java_library2")
SRCS = glob(["src/test/java/com/google/gerrit/acceptance/*.java"])
PROVIDED = [
"//gerrit-common:annotations",
"//gerrit-common:server",
"//gerrit-extension-api:api",
"//gerrit-httpd:httpd",
"//gerrit-lucene:lucene",
"//gerrit-pgm:init",
"//gerrit-reviewdb:server",
"//gerrit-server:server",
"//lib:gson",
"//lib:jsch",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/mina:sshd",
"//lib:servlet-api-3_1",
]
java_binary(
name = "acceptance-framework",
testonly = 1,
main_class = "Dummy",
visibility = ["//visibility:public"],
runtime_deps = [":lib"],
)
java_library2(
name = "lib",
testonly = 1,
srcs = SRCS,
exported_deps = [
"//gerrit-antlr:query_exception",
"//gerrit-gpg:gpg",
"//gerrit-launcher:launcher",
"//gerrit-openid:openid",
"//gerrit-pgm:daemon",
"//gerrit-pgm:http-jetty",
"//gerrit-pgm:util-nodep",
"//gerrit-server:testutil",
"//gerrit-server/src/main/prolog:common",
"//lib:truth",
"//lib:truth-java8-extension",
"//lib/auto:auto-value",
"//lib/httpcomponents:fluent-hc",
"//lib/httpcomponents:httpclient",
"//lib/httpcomponents:httpcore",
"//lib/jetty:servlet",
"//lib/jgit/org.eclipse.jgit.junit:junit",
"//lib:jimfs",
"//lib/log:impl_log4j",
"//lib/log:log4j",
],
visibility = ["//visibility:public"],
deps = PROVIDED + [
# We want these deps to be exported_deps
"//lib/greenmail:greenmail",
"//lib:gwtorm",
"//lib/guice:guice",
"//lib/guice:guice-assistedinject",
"//lib/guice:guice-servlet",
"//lib/mail:mail",
],
)
load("//tools/bzl:javadoc.bzl", "java_doc")
java_doc(
name = "acceptance-framework-javadoc",
testonly = 1,
libs = [":lib"],
pkgs = ["com.google.gerrit.acceptance"],
title = "Gerrit Acceptance Test Framework Documentation",
visibility = ["//visibility:public"],
)