blob: a47d7478f05a387054948a7b788a05e4dab33d12 [file] [log] [blame]
Emilia Kasperf7ecb0d2016-10-14 15:58:23 +02001# Wycheproof tests
2
3java_library(
4 name = "utils",
5 srcs = [
6 "java/com/google/security/wycheproof/EcUtil.java",
7 "java/com/google/security/wycheproof/RandomUtil.java",
8 "java/com/google/security/wycheproof/TestUtil.java",
9 ],
10)
11
12common_deps = [
13 ":utils",
14]
15
16test_srcs = glob(["java/com/google/security/wycheproof/testcases/*.java"]) + ["java/com/google/security/wycheproof/WycheproofRunner.java"]
17
18# These targets run all tests.
19
20load(":build_defs.bzl", "bouncycastle_all_tests", "spongycastle_all_tests")
21
22# Generates BouncyCastleAllTests_1_xx target for all available versions,
23# plus a BouncyCastleAllTests alias for latest stable.
24#
25# To test latest stable:
26# $ bazel test BouncyCastleAllTests
27#
28# To test other versions, e.g., v1.52:
29# $ bazel test BouncyCastleAllTests_1_52
30#
31# To test all known versions (warning, will take a long time):
32# $ bazel test BouncyCastleAllTest_*
33bouncycastle_all_tests(
34 # This test takes a long time, because key generation for DSA and DH generate new parameters.
35 size = "large",
36 srcs = ["java/com/google/security/wycheproof/BouncyCastleAllTests.java"] + test_srcs,
37 test_class = "com.google.security.wycheproof.BouncyCastleAllTests",
38 deps = common_deps,
39)
40
41# Generates SpongyCastleAllTests_1_xx target for all available versions,
42# plus a SpongyCastleAllTests alias for latest stable.
43#
44# To test latest stable:
45# $ bazel test SpongyCastleAllTests
46#
47# To test other versions, e.g., v1.52.0.0:
48# $ bazel test SpongyCastleAllTests_1_52
49#
50# To test all known versions (warning, will take a long time):
51# $ bazel test SpongyCastleAllTests_*
52spongycastle_all_tests(
53 # This test takes a long time, because key generation for DSA and DH generate new parameters.
54 size = "large",
55 srcs = ["java/com/google/security/wycheproof/SpongyCastleAllTests.java"] + test_srcs,
56 test_class = "com.google.security.wycheproof.SpongyCastleAllTests",
57 deps = common_deps,
58)
59
60# These targets exclude slow tests.
61
62load(":build_defs.bzl", "bouncycastle_tests", "spongycastle_tests")
63
64# Generates BouncyCastleTest_1_xx target for all available versions,
65# plus a BouncyCastleTest alias for latest stable.
66#
67# To test latest stable:
68# $ bazel test BouncyCastleTest
69#
70# To test other versions, e.g., v1.52:
71# $ bazel test BouncyCastleTest_1_52
72#
73# To test all known versions:
74# $ bazel test BouncyCastleTest_*
75bouncycastle_tests(
76 size = "large",
77 srcs = ["java/com/google/security/wycheproof/BouncyCastleTest.java"] + test_srcs,
78 test_class = "com.google.security.wycheproof.BouncyCastleTest",
79 deps = common_deps,
80)
81
82# Generates SpongyCastleTest_1_xx target for all available versions,
83# plus a SpongyCastleTest alias for latest stable.
84#
85# To test latest stable:
86# $ bazel test SpongyCastleTest
87#
88# To test other versions, e.g., v1.52.0.0:
89# $ bazel test SpongyCastleTest_1_52
90#
91# To test all known versions:
92# $ bazel test SpongyCastleTest_*
93spongycastle_tests(
94 size = "large",
95 srcs = ["java/com/google/security/wycheproof/SpongyCastleTest.java"] + test_srcs,
96 test_class = "com.google.security.wycheproof.SpongyCastleTest",
97 deps = common_deps,
98)
99
100# Platform-independent tests
101java_test(
102 name = "ProviderIndependentTest",
103 size = "small",
104 srcs = ["java/com/google/security/wycheproof/ProviderIndependentTest.java"] + test_srcs,
105 deps = common_deps,
106)