Buck: Acceptance tests depend unconditionally on bouncycastle

Since recent SSH daemon upgrades, in context of If047c3a27, loading
of BouncyCastle FileKeyPair provider depends on bouncycastle library.

If in doubt, check this comment from: FileKeyPairProvider.java:

  Note that this class has a direct dependency on BouncyCastle and
  won't work unless it has been correctly registered as a security
  provider.

Change-Id: I7e93713be5cbbdd470ab8fbb4eec61c3cbc78194
This commit is contained in:
David Ostrovsky 2016-06-06 22:45:39 +02:00
parent 02167dbee7
commit e3ba06f61f
1 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,3 @@
# These are needed as workaround for the 'verify: false' bug in Jcraft SSH library
BOUNCYCASTLE = [
'//lib/bouncycastle:bcpkix',
'//lib/bouncycastle:bcpg',
@ -11,16 +10,16 @@ def acceptance_tests(
labels = [],
source_under_test = [],
vm_args = ['-Xmx256m']):
from os import environ, path
if not environ.get('NO_BOUNCYCASTLE'):
deps = BOUNCYCASTLE + deps
from os import path
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,
deps = deps + BOUNCYCASTLE + [
'//gerrit-acceptance-tests:lib'
],
source_under_test = [
'//gerrit-httpd:httpd',
'//gerrit-sshd:sshd',