Expose acceptance test framework as new plugin artifact
Split the current gerrit-acceptance-tests in two parts: * framework + some needed deps, that is exposed as additional plugin artifact * rest of the gerrit-acceptance-test project To implement the split and not to pull in too many dependencies, some refactoring was needed. Particularly, gerrit-server:testutil depends on gerrit-server:server, that depends on almost everything. Similar problem was with gerrit-pgm:pgm, that is needed for AbstractDaemonTest to work. Split the rules in gerrit-pgm to break transitive dependency chain. We shouldn't ship artifacts twice, in plugin-api and in acceptance-framework. This change also partially reverts Ie9e63de622, where //gerrit-acceptance-tests:lib with all its transitive dependencies was included in plugin-api artifact. Expose gerrit-acceptance-framework as new plugin artifact. This allows us to support unit tests in plugins in three different build modes: * Buck in tree build mode * Buck standalone build mode * Maven build To install gerrit-acceptance-framework locally, the following command is used: buck build api_install To deploy gerrit-acceptance-framework to Maven Central, the following command is used: buck build api_deploy To support unit tests in tree build mode, the following Buck variable is exposed: GERRIT_TESTS and can be used, e.g.: java_test( name = 'cookbook_tests', srcs = glob(['src/test/java/**/*IT.java']), labels = ['cookbook-plugin'], source_under_test = [':cookbook-plugin__plugin'], deps = GERRIT_PLUGIN_API + GERRIT_TESTS + [ ':cookbook-plugin__plugin', ], ) To support unit tests in standalone build mode, acceptance-framework maven jar is defined in lib/gerrit/BUCK file: maven_jar( name = 'acceptance-framework', id = 'com.google.gerrit:gerrit-acceptance-framework:' + VER, license = 'Apache2.0', attach_source = False, repository = REPO, ) bucklets/gerrit_plugin.bucklet is extended with the same variable that points to the new maven_jar artifact, so that the same Buck java_test() rule can be used in both modes. Test plan: 1. run tests in gerrit tree 2. apply corresponding change to cookbook-plugin and run tests in gerrit tree mode 3. apply corresponding change to bucklets, and run tests for cookbook-plugin in standalone build mode Change-Id: I4cadf6616de36ca24712f8b07d282b7a50911105
This commit is contained in:

committed by
Hugo Arès

parent
aaaf9faea6
commit
947b5e53ac
3
BUCK
3
BUCK
@@ -9,6 +9,9 @@ gerrit_war(name = 'withdocs', docs = True)
|
|||||||
gerrit_war(name = 'release', ui = 'ui_optdbg_r', docs = True, context = ['//plugins:core'], visibility = ['//tools/maven:'])
|
gerrit_war(name = 'release', ui = 'ui_optdbg_r', docs = True, context = ['//plugins:core'], visibility = ['//tools/maven:'])
|
||||||
|
|
||||||
API_DEPS = [
|
API_DEPS = [
|
||||||
|
'//gerrit-acceptance-framework:api',
|
||||||
|
'//gerrit-acceptance-framework:src',
|
||||||
|
'//gerrit-acceptance-framework:javadoc',
|
||||||
'//gerrit-extension-api:extension-api',
|
'//gerrit-extension-api:extension-api',
|
||||||
'//gerrit-extension-api:extension-api-src',
|
'//gerrit-extension-api:extension-api-src',
|
||||||
'//gerrit-extension-api:extension-api-javadoc',
|
'//gerrit-extension-api:extension-api-javadoc',
|
||||||
|
@@ -14,7 +14,8 @@
|
|||||||
# When compiling from standalone cookbook-plugin, bucklets directory points
|
# When compiling from standalone cookbook-plugin, bucklets directory points
|
||||||
# to cloned bucklets library that includes real gerrit_plugin.bucklet code.
|
# to cloned bucklets library that includes real gerrit_plugin.bucklet code.
|
||||||
|
|
||||||
GERRIT_PLUGIN_API = ['//gerrit-plugin-api:lib']
|
|
||||||
GERRIT_GWT_API = ['//gerrit-plugin-gwtui/gerrit:gwtui-api']
|
GERRIT_GWT_API = ['//gerrit-plugin-gwtui/gerrit:gwtui-api']
|
||||||
|
GERRIT_PLUGIN_API = ['//gerrit-plugin-api:lib']
|
||||||
|
GERRIT_TESTS = ['//gerrit-acceptance-framework:lib']
|
||||||
|
|
||||||
STANDALONE_MODE = False
|
STANDALONE_MODE = False
|
||||||
|
77
gerrit-acceptance-framework/BUCK
Normal file
77
gerrit-acceptance-framework/BUCK
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
SRCS = glob(['src/test/java/com/google/gerrit/acceptance/*.java'])
|
||||||
|
|
||||||
|
DEPS = [
|
||||||
|
'//gerrit-gpg:gpg',
|
||||||
|
'//gerrit-pgm:daemon',
|
||||||
|
'//gerrit-pgm:util-nodep',
|
||||||
|
'//gerrit-server:testutil',
|
||||||
|
'//lib/auto:auto-value',
|
||||||
|
'//lib/httpcomponents:fluent-hc',
|
||||||
|
'//lib/httpcomponents:httpclient',
|
||||||
|
'//lib/httpcomponents:httpcore',
|
||||||
|
'//lib/jgit:junit',
|
||||||
|
'//lib/log:impl_log4j',
|
||||||
|
'//lib/log:log4j',
|
||||||
|
]
|
||||||
|
|
||||||
|
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/jgit:jgit',
|
||||||
|
'//lib:jsch',
|
||||||
|
'//lib/mina:sshd',
|
||||||
|
'//lib:servlet-api-3_1',
|
||||||
|
]
|
||||||
|
|
||||||
|
java_binary(
|
||||||
|
name = 'api',
|
||||||
|
deps = [':lib'],
|
||||||
|
visibility = ['PUBLIC'],
|
||||||
|
)
|
||||||
|
|
||||||
|
java_library(
|
||||||
|
name = 'lib',
|
||||||
|
srcs = SRCS,
|
||||||
|
exported_deps = DEPS + [
|
||||||
|
'//lib:truth',
|
||||||
|
],
|
||||||
|
provided_deps = PROVIDED + [
|
||||||
|
'//lib:gwtorm',
|
||||||
|
'//lib/guice:guice',
|
||||||
|
'//lib/guice:guice-assistedinject',
|
||||||
|
'//lib/guice:guice-servlet',
|
||||||
|
],
|
||||||
|
visibility = ['PUBLIC'],
|
||||||
|
)
|
||||||
|
|
||||||
|
java_sources(
|
||||||
|
name = 'src',
|
||||||
|
srcs = SRCS,
|
||||||
|
visibility = ['PUBLIC'],
|
||||||
|
)
|
||||||
|
|
||||||
|
java_doc(
|
||||||
|
name = 'javadoc',
|
||||||
|
title = 'Gerrit Acceptance Test Framework Documentation',
|
||||||
|
pkgs = [' com.google.gerrit.acceptance'],
|
||||||
|
paths = ['src/test/java'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = DEPS + PROVIDED + [
|
||||||
|
'//lib:guava',
|
||||||
|
'//lib/guice:guice-assistedinject',
|
||||||
|
'//lib/guice:guice_library',
|
||||||
|
'//lib/guice:guice-servlet',
|
||||||
|
'//lib/guice:javax-inject',
|
||||||
|
'//lib:gwtorm_client',
|
||||||
|
'//lib:junit__jar',
|
||||||
|
'//lib:truth__jar',
|
||||||
|
],
|
||||||
|
visibility = ['PUBLIC'],
|
||||||
|
)
|
59
gerrit-acceptance-framework/pom.xml
Normal file
59
gerrit-acceptance-framework/pom.xml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.google.gerrit</groupId>
|
||||||
|
<artifactId>gerrit-acceptance-framework</artifactId>
|
||||||
|
<version>2.12-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>Gerrit Code Review - Acceptance Test Framework</name>
|
||||||
|
<description>API for Gerrit Plugins</description>
|
||||||
|
<url>https://www.gerritcodereview.com/</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>The Apache Software License, Version 2.0</name>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://gerrit.googlesource.com/gerrit</url>
|
||||||
|
<connection>https://gerrit.googlesource.com/gerrit</connection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>Dave Borowitz</name>
|
||||||
|
</developer>
|
||||||
|
<developer>
|
||||||
|
<name>David Pursehouse</name>
|
||||||
|
</developer>
|
||||||
|
<developer>
|
||||||
|
<name>Edwin Kempin</name>
|
||||||
|
</developer>
|
||||||
|
<developer>
|
||||||
|
<name>Martin Fick</name>
|
||||||
|
</developer>
|
||||||
|
<developer>
|
||||||
|
<name>Saša Živkov</name>
|
||||||
|
</developer>
|
||||||
|
<developer>
|
||||||
|
<name>Shawn Pearce</name>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<mailingLists>
|
||||||
|
<mailingList>
|
||||||
|
<name>Repo and Gerrit Discussion</name>
|
||||||
|
<post>repo-discuss@googlegroups.com</post>
|
||||||
|
<subscribe>https://groups.google.com/forum/#!forum/repo-discuss</subscribe>
|
||||||
|
<unsubscribe>https://groups.google.com/forum/#!forum/repo-discuss</unsubscribe>
|
||||||
|
<archive>https://groups.google.com/forum/#!forum/repo-discuss</archive>
|
||||||
|
</mailingList>
|
||||||
|
</mailingLists>
|
||||||
|
|
||||||
|
<issueManagement>
|
||||||
|
<url>http://code.google.com/p/gerrit/issues/list</url>
|
||||||
|
<system>Google Code Issue Tracker</system>
|
||||||
|
</issueManagement>
|
||||||
|
</project>
|
@@ -2,10 +2,10 @@ java_library(
|
|||||||
name = 'lib',
|
name = 'lib',
|
||||||
srcs = glob(['src/test/java/com/google/gerrit/acceptance/*.java']),
|
srcs = glob(['src/test/java/com/google/gerrit/acceptance/*.java']),
|
||||||
exported_deps = [
|
exported_deps = [
|
||||||
|
'//gerrit-acceptance-framework:lib',
|
||||||
'//gerrit-common:annotations',
|
'//gerrit-common:annotations',
|
||||||
'//gerrit-common:server',
|
'//gerrit-common:server',
|
||||||
'//gerrit-extension-api:api',
|
'//gerrit-extension-api:api',
|
||||||
'//gerrit-gpg:gpg',
|
|
||||||
'//gerrit-gpg:testutil',
|
'//gerrit-gpg:testutil',
|
||||||
'//gerrit-launcher:launcher',
|
'//gerrit-launcher:launcher',
|
||||||
'//gerrit-lucene:lucene',
|
'//gerrit-lucene:lucene',
|
||||||
@@ -15,8 +15,8 @@ java_library(
|
|||||||
'//gerrit-pgm:util',
|
'//gerrit-pgm:util',
|
||||||
'//gerrit-reviewdb:server',
|
'//gerrit-reviewdb:server',
|
||||||
'//gerrit-server:server',
|
'//gerrit-server:server',
|
||||||
'//gerrit-server/src/main/prolog:common',
|
|
||||||
'//gerrit-server:testutil',
|
'//gerrit-server:testutil',
|
||||||
|
'//gerrit-server/src/main/prolog:common',
|
||||||
'//gerrit-sshd:sshd',
|
'//gerrit-sshd:sshd',
|
||||||
|
|
||||||
'//lib:args4j',
|
'//lib:args4j',
|
||||||
@@ -26,21 +26,13 @@ java_library(
|
|||||||
'//lib:h2',
|
'//lib:h2',
|
||||||
'//lib:jsch',
|
'//lib:jsch',
|
||||||
'//lib:servlet-api-3_1',
|
'//lib:servlet-api-3_1',
|
||||||
'//lib:truth',
|
|
||||||
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
'//lib/bouncycastle:bcpg',
|
'//lib/bouncycastle:bcpg',
|
||||||
'//lib/bouncycastle:bcprov',
|
'//lib/bouncycastle:bcprov',
|
||||||
'//lib/guice:guice',
|
'//lib/guice:guice',
|
||||||
'//lib/guice:guice-assistedinject',
|
'//lib/guice:guice-assistedinject',
|
||||||
'//lib/guice:guice-servlet',
|
'//lib/guice:guice-servlet',
|
||||||
'//lib/httpcomponents:fluent-hc',
|
|
||||||
'//lib/httpcomponents:httpclient',
|
|
||||||
'//lib/httpcomponents:httpcore',
|
|
||||||
'//lib/jgit:jgit',
|
'//lib/jgit:jgit',
|
||||||
'//lib/jgit:junit',
|
|
||||||
'//lib/log:impl_log4j',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
'//lib/mina:sshd',
|
'//lib/mina:sshd',
|
||||||
],
|
],
|
||||||
visibility = [
|
visibility = [
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
java_library(
|
DEPS = [
|
||||||
name = 'gpg',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-common:server',
|
'//gerrit-common:server',
|
||||||
'//gerrit-extension-api:api',
|
'//gerrit-extension-api:api',
|
||||||
'//gerrit-reviewdb:server',
|
'//gerrit-reviewdb:server',
|
||||||
@@ -13,10 +10,14 @@ java_library(
|
|||||||
'//lib/guice:guice-servlet',
|
'//lib/guice:guice-servlet',
|
||||||
'//lib/jgit:jgit',
|
'//lib/jgit:jgit',
|
||||||
'//lib/log:api',
|
'//lib/log:api',
|
||||||
],
|
]
|
||||||
provided_deps = [
|
|
||||||
'//lib/bouncycastle:bcprov',
|
java_library(
|
||||||
|
name = 'gpg',
|
||||||
|
srcs = glob(['src/main/java/**/*.java']),
|
||||||
|
provided_deps = DEPS + [
|
||||||
'//lib/bouncycastle:bcpg',
|
'//lib/bouncycastle:bcpg',
|
||||||
|
'//lib/bouncycastle:bcprov',
|
||||||
],
|
],
|
||||||
visibility = ['PUBLIC'],
|
visibility = ['PUBLIC'],
|
||||||
)
|
)
|
||||||
@@ -28,12 +29,10 @@ TESTUTIL_SRCS = [
|
|||||||
java_library(
|
java_library(
|
||||||
name = 'testutil',
|
name = 'testutil',
|
||||||
srcs = TESTUTIL_SRCS,
|
srcs = TESTUTIL_SRCS,
|
||||||
deps = [
|
deps = DEPS + [
|
||||||
':gpg',
|
':gpg',
|
||||||
'//lib:guava',
|
|
||||||
'//lib/bouncycastle:bcpg',
|
'//lib/bouncycastle:bcpg',
|
||||||
'//lib/bouncycastle:bcprov',
|
'//lib/bouncycastle:bcprov',
|
||||||
'//lib/jgit:jgit',
|
|
||||||
],
|
],
|
||||||
visibility = ['PUBLIC'],
|
visibility = ['PUBLIC'],
|
||||||
)
|
)
|
||||||
@@ -44,20 +43,15 @@ java_test(
|
|||||||
['src/test/java/**/*.java'],
|
['src/test/java/**/*.java'],
|
||||||
excludes = TESTUTIL_SRCS,
|
excludes = TESTUTIL_SRCS,
|
||||||
),
|
),
|
||||||
deps = [
|
deps = DEPS + [
|
||||||
':gpg',
|
':gpg',
|
||||||
':testutil',
|
':testutil',
|
||||||
'//gerrit-extension-api:api',
|
'//gerrit-cache-h2:cache-h2',
|
||||||
'//gerrit-reviewdb:server',
|
'//gerrit-lucene:lucene',
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-server:testutil',
|
'//gerrit-server:testutil',
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:truth',
|
'//lib:truth',
|
||||||
'//lib/bouncycastle:bcpg',
|
'//lib/bouncycastle:bcpg',
|
||||||
'//lib/bouncycastle:bcprov',
|
'//lib/bouncycastle:bcprov',
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/jgit:jgit',
|
|
||||||
'//lib/jgit:junit',
|
'//lib/jgit:junit',
|
||||||
],
|
],
|
||||||
source_under_test = [':gpg'],
|
source_under_test = [':gpg'],
|
||||||
|
@@ -2,6 +2,7 @@ java_library(
|
|||||||
name = 'gwtdebug',
|
name = 'gwtdebug',
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
srcs = glob(['src/main/java/**/*.java']),
|
||||||
deps = [
|
deps = [
|
||||||
|
'//gerrit-pgm:daemon',
|
||||||
'//gerrit-pgm:pgm',
|
'//gerrit-pgm:pgm',
|
||||||
'//gerrit-pgm:util',
|
'//gerrit-pgm:util',
|
||||||
'//gerrit-util-cli:cli',
|
'//gerrit-util-cli:cli',
|
||||||
|
@@ -53,21 +53,24 @@ java_library(
|
|||||||
],
|
],
|
||||||
provided_deps = ['//gerrit-launcher:launcher'],
|
provided_deps = ['//gerrit-launcher:launcher'],
|
||||||
visibility = [
|
visibility = [
|
||||||
|
'//gerrit-acceptance-framework/...',
|
||||||
'//gerrit-acceptance-tests/...',
|
'//gerrit-acceptance-tests/...',
|
||||||
'//gerrit-war:',
|
'//gerrit-war:',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
java_library(
|
REST_UTIL_DEPS = [
|
||||||
name = 'util',
|
|
||||||
srcs = glob([SRCS + 'util/*.java']),
|
|
||||||
deps = DEPS + [
|
|
||||||
'//gerrit-cache-h2:cache-h2',
|
'//gerrit-cache-h2:cache-h2',
|
||||||
'//gerrit-util-cli:cli',
|
'//gerrit-util-cli:cli',
|
||||||
'//lib:args4j',
|
'//lib:args4j',
|
||||||
'//lib:gwtorm',
|
'//lib:gwtorm',
|
||||||
'//lib/commons:dbcp',
|
'//lib/commons:dbcp',
|
||||||
],
|
]
|
||||||
|
|
||||||
|
java_library(
|
||||||
|
name = 'util',
|
||||||
|
deps = DEPS + REST_UTIL_DEPS,
|
||||||
|
exported_deps = [':util-nodep'],
|
||||||
visibility = [
|
visibility = [
|
||||||
'//gerrit-acceptance-tests/...',
|
'//gerrit-acceptance-tests/...',
|
||||||
'//gerrit-gwtdebug:gwtdebug',
|
'//gerrit-gwtdebug:gwtdebug',
|
||||||
@@ -75,6 +78,15 @@ java_library(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
java_library(
|
||||||
|
name = 'util-nodep',
|
||||||
|
srcs = glob([SRCS + 'util/*.java']),
|
||||||
|
provided_deps = DEPS + REST_UTIL_DEPS,
|
||||||
|
visibility = [
|
||||||
|
'//gerrit-acceptance-framework/...',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = 'http',
|
name = 'http',
|
||||||
srcs = glob([SRCS + 'http/**/*.java']),
|
srcs = glob([SRCS + 'http/**/*.java']),
|
||||||
@@ -90,11 +102,7 @@ java_library(
|
|||||||
visibility = ['//gerrit-war:'],
|
visibility = ['//gerrit-war:'],
|
||||||
)
|
)
|
||||||
|
|
||||||
java_library(
|
REST_PGM_DEPS = [
|
||||||
name = 'pgm',
|
|
||||||
srcs = glob([SRCS + '*.java', SRCS + 'rules/*.java']),
|
|
||||||
resources = glob([RSRCS + '*']),
|
|
||||||
deps = DEPS + [
|
|
||||||
':http',
|
':http',
|
||||||
':init',
|
':init',
|
||||||
':init-api',
|
':init-api',
|
||||||
@@ -112,8 +120,14 @@ java_library(
|
|||||||
'//lib/prolog:cafeteria',
|
'//lib/prolog:cafeteria',
|
||||||
'//lib/prolog:compiler',
|
'//lib/prolog:compiler',
|
||||||
'//lib/prolog:runtime',
|
'//lib/prolog:runtime',
|
||||||
|
]
|
||||||
|
|
||||||
|
java_library(
|
||||||
|
name = 'pgm',
|
||||||
|
resources = glob([RSRCS + '*']),
|
||||||
|
deps = DEPS + REST_PGM_DEPS + [
|
||||||
|
':daemon',
|
||||||
],
|
],
|
||||||
provided_deps = ['//gerrit-launcher:launcher'],
|
|
||||||
visibility = [
|
visibility = [
|
||||||
'//:',
|
'//:',
|
||||||
'//gerrit-acceptance-tests/...',
|
'//gerrit-acceptance-tests/...',
|
||||||
@@ -123,6 +137,21 @@ java_library(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# no transitive deps, used for gerrit-acceptance-framework
|
||||||
|
java_library(
|
||||||
|
name = 'daemon',
|
||||||
|
srcs = glob([SRCS + '*.java', SRCS + 'rules/*.java']),
|
||||||
|
resources = glob([RSRCS + '*']),
|
||||||
|
deps = ['//lib/auto:auto-value'],
|
||||||
|
provided_deps = DEPS + REST_PGM_DEPS + [
|
||||||
|
'//gerrit-launcher:launcher',
|
||||||
|
],
|
||||||
|
visibility = [
|
||||||
|
'//gerrit-acceptance-framework/...',
|
||||||
|
'//gerrit-gwtdebug:gwtdebug',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
java_test(
|
java_test(
|
||||||
name = 'pgm_tests',
|
name = 'pgm_tests',
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
srcs = glob(['src/test/java/**/*.java']),
|
||||||
|
@@ -20,7 +20,6 @@ java_binary(
|
|||||||
java_library(
|
java_library(
|
||||||
name = 'lib',
|
name = 'lib',
|
||||||
exported_deps = PLUGIN_API + [
|
exported_deps = PLUGIN_API + [
|
||||||
'//gerrit-acceptance-tests:lib',
|
|
||||||
'//gerrit-antlr:query_exception',
|
'//gerrit-antlr:query_exception',
|
||||||
'//gerrit-antlr:query_parser',
|
'//gerrit-antlr:query_parser',
|
||||||
'//gerrit-common:annotations',
|
'//gerrit-common:annotations',
|
||||||
|
@@ -82,14 +82,7 @@ java_sources(
|
|||||||
visibility = ['PUBLIC'],
|
visibility = ['PUBLIC'],
|
||||||
)
|
)
|
||||||
|
|
||||||
TESTUTIL = glob([
|
TESTUTIL_DEPS = [
|
||||||
'src/test/java/com/google/gerrit/testutil/**/*.java',
|
|
||||||
'src/test/java/com/google/gerrit/server/project/Util.java',
|
|
||||||
])
|
|
||||||
java_library(
|
|
||||||
name = 'testutil',
|
|
||||||
srcs = TESTUTIL,
|
|
||||||
deps = [
|
|
||||||
':server',
|
':server',
|
||||||
'//gerrit-common:server',
|
'//gerrit-common:server',
|
||||||
'//gerrit-cache-h2:cache-h2',
|
'//gerrit-cache-h2:cache-h2',
|
||||||
@@ -100,7 +93,6 @@ java_library(
|
|||||||
'//lib:gwtorm',
|
'//lib:gwtorm',
|
||||||
'//lib:h2',
|
'//lib:h2',
|
||||||
'//lib:truth',
|
'//lib:truth',
|
||||||
'//lib/auto:auto-value',
|
|
||||||
'//lib/guice:guice',
|
'//lib/guice:guice',
|
||||||
'//lib/guice:guice-servlet',
|
'//lib/guice:guice-servlet',
|
||||||
'//lib/jgit:jgit',
|
'//lib/jgit:jgit',
|
||||||
@@ -108,7 +100,19 @@ java_library(
|
|||||||
'//lib/log:api',
|
'//lib/log:api',
|
||||||
'//lib/log:impl_log4j',
|
'//lib/log:impl_log4j',
|
||||||
'//lib/log:log4j',
|
'//lib/log:log4j',
|
||||||
|
]
|
||||||
|
|
||||||
|
TESTUTIL = glob([
|
||||||
|
'src/test/java/com/google/gerrit/testutil/**/*.java',
|
||||||
|
'src/test/java/com/google/gerrit/server/project/Util.java',
|
||||||
|
])
|
||||||
|
java_library(
|
||||||
|
name = 'testutil',
|
||||||
|
srcs = TESTUTIL,
|
||||||
|
deps = [
|
||||||
|
'//lib/auto:auto-value',
|
||||||
],
|
],
|
||||||
|
provided_deps = TESTUTIL_DEPS,
|
||||||
exported_deps = [
|
exported_deps = [
|
||||||
'//lib/easymock:easymock',
|
'//lib/easymock:easymock',
|
||||||
'//lib/powermock:powermock-api-easymock',
|
'//lib/powermock:powermock-api-easymock',
|
||||||
@@ -147,19 +151,10 @@ java_test(
|
|||||||
name = 'prolog_tests',
|
name = 'prolog_tests',
|
||||||
srcs = PROLOG_TESTS,
|
srcs = PROLOG_TESTS,
|
||||||
resources = glob(['src/test/resources/com/google/gerrit/rules/**/*']),
|
resources = glob(['src/test/resources/com/google/gerrit/rules/**/*']),
|
||||||
deps = [
|
deps = TESTUTIL_DEPS + [
|
||||||
':prolog_test_case',
|
':prolog_test_case',
|
||||||
':server',
|
|
||||||
':testutil',
|
':testutil',
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
'//gerrit-server/src/main/prolog:common',
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/jgit:jgit',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/prolog:runtime',
|
'//lib/prolog:runtime',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@@ -171,22 +166,13 @@ QUERY_TESTS = glob(
|
|||||||
java_test(
|
java_test(
|
||||||
name = 'query_tests',
|
name = 'query_tests',
|
||||||
srcs = QUERY_TESTS,
|
srcs = QUERY_TESTS,
|
||||||
deps = [
|
deps = TESTUTIL_DEPS + [
|
||||||
':server',
|
|
||||||
':testutil',
|
':testutil',
|
||||||
'//gerrit-antlr:query_exception',
|
'//gerrit-antlr:query_exception',
|
||||||
'//gerrit-antlr:query_parser',
|
'//gerrit-antlr:query_parser',
|
||||||
'//gerrit-common:annotations',
|
'//gerrit-common:annotations',
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
'//gerrit-server/src/main/prolog:common',
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/antlr:java_runtime',
|
'//lib/antlr:java_runtime',
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/jgit:jgit',
|
|
||||||
'//lib/jgit:junit',
|
|
||||||
'//lib/joda:joda-time',
|
'//lib/joda:joda-time',
|
||||||
],
|
],
|
||||||
source_under_test = [':server'],
|
source_under_test = [':server'],
|
||||||
@@ -199,25 +185,15 @@ java_test(
|
|||||||
['src/test/java/**/*.java'],
|
['src/test/java/**/*.java'],
|
||||||
excludes = TESTUTIL + PROLOG_TESTS + PROLOG_TEST_CASE + QUERY_TESTS
|
excludes = TESTUTIL + PROLOG_TESTS + PROLOG_TEST_CASE + QUERY_TESTS
|
||||||
),
|
),
|
||||||
deps = [
|
deps = TESTUTIL_DEPS + [
|
||||||
':server',
|
|
||||||
':testutil',
|
':testutil',
|
||||||
'//gerrit-antlr:query_exception',
|
'//gerrit-antlr:query_exception',
|
||||||
'//gerrit-common:annotations',
|
'//gerrit-common:annotations',
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gpg:gpg',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
'//gerrit-server/src/main/prolog:common',
|
||||||
'//lib:args4j',
|
'//lib:args4j',
|
||||||
'//lib:grappa',
|
'//lib:grappa',
|
||||||
'//lib:guava',
|
'//lib:guava',
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
'//lib/guice:guice-assistedinject',
|
||||||
'//lib/jgit:jgit',
|
|
||||||
'//lib/jgit:junit',
|
|
||||||
'//lib/joda:joda-time',
|
'//lib/joda:joda-time',
|
||||||
'//lib/prolog:runtime',
|
'//lib/prolog:runtime',
|
||||||
],
|
],
|
||||||
|
Submodule plugins/cookbook-plugin updated: ec6ed89c47...2d25edee3f
@@ -10,16 +10,19 @@ maven_package(
|
|||||||
url = URL,
|
url = URL,
|
||||||
version = GERRIT_VERSION,
|
version = GERRIT_VERSION,
|
||||||
jar = {
|
jar = {
|
||||||
|
'gerrit-acceptance-framework': '//gerrit-acceptance-framework:api',
|
||||||
'gerrit-extension-api': '//gerrit-extension-api:extension-api',
|
'gerrit-extension-api': '//gerrit-extension-api:extension-api',
|
||||||
'gerrit-plugin-api': '//gerrit-plugin-api:plugin-api',
|
'gerrit-plugin-api': '//gerrit-plugin-api:plugin-api',
|
||||||
'gerrit-plugin-gwtui': '//gerrit-plugin-gwtui:gwtui-api',
|
'gerrit-plugin-gwtui': '//gerrit-plugin-gwtui:gwtui-api',
|
||||||
},
|
},
|
||||||
src = {
|
src = {
|
||||||
|
'gerrit-acceptance-framework': '//gerrit-acceptance-framework:src',
|
||||||
'gerrit-extension-api': '//gerrit-extension-api:extension-api-src',
|
'gerrit-extension-api': '//gerrit-extension-api:extension-api-src',
|
||||||
'gerrit-plugin-api': '//gerrit-plugin-api:plugin-api-src',
|
'gerrit-plugin-api': '//gerrit-plugin-api:plugin-api-src',
|
||||||
'gerrit-plugin-gwtui': '//gerrit-plugin-gwtui:gwtui-api-src',
|
'gerrit-plugin-gwtui': '//gerrit-plugin-gwtui:gwtui-api-src',
|
||||||
},
|
},
|
||||||
doc = {
|
doc = {
|
||||||
|
'gerrit-acceptance-framework': '//gerrit-acceptance-framework:javadoc',
|
||||||
'gerrit-extension-api': '//gerrit-extension-api:extension-api-javadoc',
|
'gerrit-extension-api': '//gerrit-extension-api:extension-api-javadoc',
|
||||||
'gerrit-plugin-api': '//gerrit-plugin-api:plugin-api-javadoc',
|
'gerrit-plugin-api': '//gerrit-plugin-api:plugin-api-javadoc',
|
||||||
'gerrit-plugin-gwtui': '//gerrit-plugin-gwtui:gwtui-api-javadoc',
|
'gerrit-plugin-gwtui': '//gerrit-plugin-gwtui:gwtui-api-javadoc',
|
||||||
|
@@ -45,10 +45,10 @@ def replace_in_file(filename, src_pattern):
|
|||||||
|
|
||||||
src_pattern = re.compile(r'^(\s*<version>)([-.\w]+)(</version>\s*)$',
|
src_pattern = re.compile(r'^(\s*<version>)([-.\w]+)(</version>\s*)$',
|
||||||
re.MULTILINE)
|
re.MULTILINE)
|
||||||
for project in ['gerrit-extension-api', 'gerrit-plugin-api',
|
for project in ['gerrit-acceptance-framework', 'gerrit-extension-api',
|
||||||
'gerrit-plugin-archetype', 'gerrit-plugin-gwt-archetype',
|
'gerrit-plugin-api', 'gerrit-plugin-archetype',
|
||||||
'gerrit-plugin-gwtui', 'gerrit-plugin-js-archetype',
|
'gerrit-plugin-gwt-archetype', 'gerrit-plugin-gwtui',
|
||||||
'gerrit-war']:
|
'gerrit-plugin-js-archetype', 'gerrit-war']:
|
||||||
pom = os.path.join(project, 'pom.xml')
|
pom = os.path.join(project, 'pom.xml')
|
||||||
replace_in_file(pom, src_pattern)
|
replace_in_file(pom, src_pattern)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user