forked from C2SP/wycheproof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
235 lines (210 loc) · 7.22 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
testdata = [
"//testvectors:all",
]
# java
java_library(
name = "utils",
srcs = [
"java/com/google/security/wycheproof/EcUtil.java",
"java/com/google/security/wycheproof/JsonUtil.java",
"java/com/google/security/wycheproof/RandomUtil.java",
"java/com/google/security/wycheproof/TestUtil.java",
],
deps = [
"@com_google_code_gson",
],
)
common_deps = [
":utils",
"@com_google_code_gson",
"@junit",
]
test_srcs = glob([
"java/**/WycheproofRunner.java",
"java/**/testcases/*Test.java",
])
# Bouncy Castle tests
load("//tools:build_defs.bzl", "bouncycastle_all_tests", "bouncycastle_tests")
# Generates BouncyCastleAllTests_1_xx target for all available versions,
# plus a BouncyCastleAllTests alias for latest stable.
#
# To test latest stable:
# $ bazel test BouncyCastleAllTests
#
# To test other versions, e.g., v1.52:
# $ bazel test BouncyCastleAllTests_1_52
#
# To test all known versions (warning, will take a long time):
# $ bazel test BouncyCastleAllTest_*
bouncycastle_all_tests(
# This test takes a long time, because key generation for DSA and DH generate new parameters.
size = "enormous",
srcs = ["java/com/google/security/wycheproof/BouncyCastleAllTests.java"] + test_srcs,
test_class = "com.google.security.wycheproof.BouncyCastleAllTests",
deps = common_deps,
data = testdata,
)
java_test(
name = "BouncyCastleAllTestsLocal",
size = "enormous",
srcs = ["java/com/google/security/wycheproof/BouncyCastleAllTests.java"] + test_srcs,
# this target requires specifing a shell variable, thus won't work with the wildcard target patterns.
# with tags=["manual"] it'll be excluded from said patterns.
tags = ["manual"],
test_class = "com.google.security.wycheproof.BouncyCastleAllTests",
deps = common_deps + ["@local//:bouncycastle_jar"],
data = testdata,
)
# Generates BouncyCastleTest_1_xx target for all available versions,
# plus a BouncyCastleTest alias for latest stable.
#
# To test latest stable:
# $ bazel test BouncyCastleTest
#
# To test other versions, e.g., v1.52:
# $ bazel test BouncyCastleTest_1_52
#
# To test all known versions:
# $ bazel test BouncyCastleTest_*
bouncycastle_tests(
size = "large",
srcs = ["java/com/google/security/wycheproof/BouncyCastleTest.java"] + test_srcs,
test_class = "com.google.security.wycheproof.BouncyCastleTest",
deps = common_deps,
data = testdata,
)
java_test(
name = "BouncyCastleTestLocal",
size = "large",
srcs = ["java/com/google/security/wycheproof/BouncyCastleTest.java"] + test_srcs,
# this target requires specifing a shell variable, thus won't work with the wildcard target patterns.
# with tags=["manual"] it'll be excluded from said patterns.
tags = ["manual"],
test_class = "com.google.security.wycheproof.BouncyCastleTest",
deps = common_deps + ["@local//:bouncycastle_jar"],
data = testdata,
)
# Spongy Castle tests
load("//tools:build_defs.bzl", "spongycastle_all_tests", "spongycastle_tests")
# Generates SpongyCastleAllTests_1_xx target for all available versions,
# plus a SpongyCastleAllTests alias for latest stable.
#
# To test latest stable:
# $ bazel test SpongyCastleAllTests
#
# To test other versions, e.g., v1.52.0.0:
# $ bazel test SpongyCastleAllTests_1_52
#
# To test all known versions (warning, will take a long time):
# $ bazel test SpongyCastleAllTests_*
spongycastle_all_tests(
# This test takes a long time, because key generation for DSA and DH generate new parameters.
size = "enormous",
srcs = ["java/com/google/security/wycheproof/SpongyCastleAllTests.java"] + test_srcs,
test_class = "com.google.security.wycheproof.SpongyCastleAllTests",
deps = common_deps,
data = testdata,
)
# Generates SpongyCastleTest_1_xx target for all available versions,
# plus a SpongyCastleTest alias for latest stable.
#
# To test latest stable:
# $ bazel test SpongyCastleTest
#
# To test other versions, e.g., v1.52.0.0:
# $ bazel test SpongyCastleTest_1_52
#
# To test all known versions:
# $ bazel test SpongyCastleTest_*
spongycastle_tests(
size = "large",
srcs = ["java/com/google/security/wycheproof/SpongyCastleTest.java"] + test_srcs,
test_class = "com.google.security.wycheproof.SpongyCastleTest",
deps = common_deps,
data = testdata,
)
# Conscrypt tests
load("//tools:build_defs.bzl", "conscrypt_tests", "conscrypt_all_tests")
conscrypt_tests(
size = "large",
srcs = ["java/com/google/security/wycheproof/ConscryptTest.java"] + test_srcs,
test_class = "com.google.security.wycheproof.ConscryptTest",
deps = common_deps,
data = testdata,
)
conscrypt_all_tests(
size = "enormous",
srcs = ["java/com/google/security/wycheproof/ConscryptAllTests.java"] + test_srcs,
test_class = "com.google.security.wycheproof.ConscryptAllTests",
deps = common_deps,
data = testdata,
)
# Amazon Corretto Crypto Provider tests
load("//tools:build_defs.bzl", "accp_tests", "accp_all_tests")
accp_tests(
size = "enormous",
srcs = ["java/com/google/security/wycheproof/AccpTest.java"] + test_srcs,
test_class = "com.google.security.wycheproof.AccpTest",
deps = common_deps,
data = testdata,
)
java_test(
name = "AccpTestLocal",
size = "enormous",
srcs = ["java/com/google/security/wycheproof/AccpTest.java"] + test_srcs,
# this target requires specifing a shell variable, thus won't work with the wildcard target patterns.
# with tags=["manual"] it'll be excluded from said patterns.
tags = ["manual"],
test_class = "com.google.security.wycheproof.AccpTest",
deps = common_deps + ["@local//:accp_jar"],
data = testdata,
)
accp_all_tests(
size = "enormous",
srcs = ["java/com/google/security/wycheproof/AccpAllTests.java"] + test_srcs,
test_class = "com.google.security.wycheproof.AccpAllTests",
deps = common_deps,
data = testdata,
)
java_test(
name = "AccpAllTestsLocal",
size = "enormous",
srcs = ["java/com/google/security/wycheproof/AccpAllTests.java"] + test_srcs,
# this target requires specifing a shell variable, thus won't work with the wildcard target patterns.
# with tags=["manual"] it'll be excluded from said patterns.
tags = ["manual"],
test_class = "com.google.security.wycheproof.AccpAllTests",
deps = common_deps + ["@local//:accp_jar"],
data = testdata,
)
# OpenJDK tests
java_test(
name = "OpenJDKTest",
size = "large",
srcs = ["java/com/google/security/wycheproof/OpenJDKTest.java"] + test_srcs,
test_class = "com.google.security.wycheproof.OpenJDKTest",
deps = common_deps,
data = testdata,
)
java_test(
name = "OpenJDKAllTests",
size = "large",
srcs = ["java/com/google/security/wycheproof/OpenJDKAllTests.java"] + test_srcs,
test_class = "com.google.security.wycheproof.OpenJDKAllTests",
deps = common_deps,
data = testdata,
)
# Platform-independent tests
java_test(
name = "ProviderIndependentTest",
size = "small",
srcs = ["java/com/google/security/wycheproof/ProviderIndependentTest.java"] + test_srcs,
deps = common_deps,
data = testdata,
)
# WebCrypto Javascript tests
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_deps")
closure_js_deps(
name = "E2EDeps",
deps = ["@google_e2e//:e2e"],
)