Merge #72: Add support for AmazonCorrettoCryptoProvider.

NOKEYCHECK=True
PiperOrigin-RevId: 285889021
GitOrigin-RevId: 5c275cb55af7e77e50e40ab4e811965ee2e8d6bb
This commit is contained in:
thaidn
2019-12-16 17:57:45 -08:00
committed by Tink Team
parent be388ef334
commit fb72abc097
8 changed files with 245 additions and 2 deletions
+16
View File
@@ -79,3 +79,19 @@ def conscrypt_tests(srcs, deps, size, test_class, data):
"""Conscrypt version-specific tests."""
add_tests("ConscryptTest", conscrypt_versions, conscrypt_dep, srcs, deps, size, test_class, data)
# Amazon Corretto Crypto Provider targets
accp_versions = ["1_1_0", "1_1_1", "1_2_0"]
accp_dep = "@amazon_corretto_crypto_provider"
# These targets run all tests.
def accp_all_tests(srcs, deps, size, test_class, data):
"""Amazon Corretto Crypto Provider version-specific tests."""
add_tests("AccpAllTests", accp_versions, accp_dep, srcs, deps, size, test_class, data)
# These targets exclue @SlowTest
def accp_tests(srcs, deps, size, test_class, data):
"""Amazon Corretto Crypto Provider version-specific tests."""
add_tests("AccpTest", accp_versions, accp_dep, srcs, deps, size, test_class, data)
+16 -1
View File
@@ -1,4 +1,4 @@
"""Add test targets for Bouncy Castle using a local jar.
"""Add test targets for using a local jar.
"""
@@ -10,6 +10,14 @@ java_import(
)
"""
_accp_jar_rule = """
java_import(
name = "accp_jar",
jars = ["accp.jar"],
visibility = ["//visibility:public"],
)
"""
# TODO(ekasper): implement environment invalidation once supported by bazel,
# see https://bazel.build/designs/2016/10/18/repository-invalidation.html
# Meanwhile, users have to call 'bazel clean' explicitly when the
@@ -23,6 +31,13 @@ def _local_jars_impl(repository_ctx):
)
contents += _bouncycastle_jar_rule
if "WYCHEPROOF_ACCP_JAR" in repository_ctx.os.environ:
repository_ctx.symlink(
repository_ctx.os.environ["WYCHEPROOF_ACCP_JAR"],
"accp.jar",
)
contents += _accp_jar_rule
repository_ctx.file("BUILD", contents)
local_jars = repository_rule(