gerrit/gerrit-acceptance-tests/tests.defs
David Ostrovsky bb7061592e Buck: Tweak unit test invocation and halve the run time
Since Ia3f689a9e6 we spawn each and every unit test in its own
JVM with a lot of overhead. This change spawns only one single
JVM per acceptance test group. With recent refactoring, we don't
need to isolate unit test environment, as they can run in parallel
without collision between tests.

* old: TESTING...FINISHED 271,2s (1400 PASS/22 SKIP/0 FAIL)
* new: TESTING...FINISHED 161,0s (1400 PASS/22 SKIP/0 FAIL)

Change-Id: I7140f29d194b26fe0c5104733f5681c139e77c73
2015-10-16 08:25:43 +02:00

35 lines
837 B
Plaintext

# These are needed as workaround for the 'verify: false' bug in Jcraft SSH library
BOUNCYCASTLE = [
'//lib/bouncycastle:bcpkix',
'//lib/bouncycastle:bcpg',
]
def acceptance_tests(
group,
srcs,
deps = [],
labels = [],
source_under_test = [],
vm_args = ['-Xmx256m']):
from os import environ, path
if not environ.get('NO_BOUNCYCASTLE'):
deps = BOUNCYCASTLE + deps
if path.exists('/dev/urandom'):
vm_args = vm_args + ['-Djava.security.egd=file:/dev/./urandom']
java_test(
name = group,
srcs = srcs,
deps = ['//gerrit-acceptance-tests:lib'] + deps,
source_under_test = [
'//gerrit-httpd:httpd',
'//gerrit-sshd:sshd',
'//gerrit-server:server',
] + source_under_test,
labels = labels + [
'acceptance',
'slow',
],
vm_args = vm_args,
)