222806f56f
This reduces startup time for JUnit tests which need random data to seed the SSHD PRNG. Using /dev/./urandom is necessary as a workaround on modern Java versions[1]. [1] https://bugs.openjdk.java.net/browse/JDK-6202721 Change-Id: I944f73e93dca131c6947779a3f9f4fb8d87b9a54
33 lines
804 B
Plaintext
33 lines
804 B
Plaintext
# these need as workaround for the 'verify: false' bug in Jcraft SSH library
|
|
BOUNCYCASTLE = [
|
|
'//lib/bouncycastle:bcpkix',
|
|
'//lib/bouncycastle:bcpg',
|
|
]
|
|
|
|
def acceptance_tests(
|
|
srcs,
|
|
deps = [],
|
|
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']
|
|
|
|
for j in srcs:
|
|
java_test(
|
|
name = j[:-len('.java')],
|
|
srcs = [j],
|
|
deps = ['//gerrit-acceptance-tests:lib'] + deps,
|
|
source_under_test = [
|
|
'//gerrit-httpd:httpd',
|
|
'//gerrit-sshd:sshd',
|
|
'//gerrit-server:server',
|
|
],
|
|
labels = [
|
|
'acceptance',
|
|
'slow',
|
|
],
|
|
vm_args = vm_args,
|
|
)
|