blob: 82be038929d207f9c6e66aa21c5307e2af929718 [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
Emilia Käsperb898a622017-01-12 02:57:11 +010041java_test(
42 name = "BouncyCastleAllTestsLocal",
Thai Duongf2f6a302017-02-01 15:49:11 -080043 # this target requires specifing a shell variable, thus won't work with the wildcard target patterns.
44 # with tags=["manual"] it'll be excluded from said patterns.
45 tags = ["manual"],
Emilia Käsperb898a622017-01-12 02:57:11 +010046 size = "large",
47 srcs = ["java/com/google/security/wycheproof/BouncyCastleAllTests.java"] + test_srcs,
48 test_class = "com.google.security.wycheproof.BouncyCastleAllTests",
49 deps = common_deps + ["@local//:bouncycastle_jar"],
50)
51
Emilia Kasperf7ecb0d2016-10-14 15:58:23 +020052# Generates SpongyCastleAllTests_1_xx target for all available versions,
53# plus a SpongyCastleAllTests alias for latest stable.
54#
55# To test latest stable:
56# $ bazel test SpongyCastleAllTests
57#
58# To test other versions, e.g., v1.52.0.0:
59# $ bazel test SpongyCastleAllTests_1_52
60#
61# To test all known versions (warning, will take a long time):
62# $ bazel test SpongyCastleAllTests_*
63spongycastle_all_tests(
64 # This test takes a long time, because key generation for DSA and DH generate new parameters.
65 size = "large",
66 srcs = ["java/com/google/security/wycheproof/SpongyCastleAllTests.java"] + test_srcs,
67 test_class = "com.google.security.wycheproof.SpongyCastleAllTests",
68 deps = common_deps,
69)
70
71# These targets exclude slow tests.
72
73load(":build_defs.bzl", "bouncycastle_tests", "spongycastle_tests")
74
75# Generates BouncyCastleTest_1_xx target for all available versions,
76# plus a BouncyCastleTest alias for latest stable.
77#
78# To test latest stable:
79# $ bazel test BouncyCastleTest
80#
81# To test other versions, e.g., v1.52:
82# $ bazel test BouncyCastleTest_1_52
83#
84# To test all known versions:
85# $ bazel test BouncyCastleTest_*
86bouncycastle_tests(
87 size = "large",
88 srcs = ["java/com/google/security/wycheproof/BouncyCastleTest.java"] + test_srcs,
89 test_class = "com.google.security.wycheproof.BouncyCastleTest",
90 deps = common_deps,
91)
92
Emilia Käsperb898a622017-01-12 02:57:11 +010093java_test(
94 name = "BouncyCastleTestLocal",
Thai Duongf2f6a302017-02-01 15:49:11 -080095 # this target requires specifing a shell variable, thus won't work with the wildcard target patterns.
96 # with tags=["manual"] it'll be excluded from said patterns.
97 tags = ["manual"],
Emilia Käsperb898a622017-01-12 02:57:11 +010098 size = "large",
99 srcs = ["java/com/google/security/wycheproof/BouncyCastleTest.java"] + test_srcs,
100 test_class = "com.google.security.wycheproof.BouncyCastleTest",
101 deps = common_deps + ["@local//:bouncycastle_jar"],
102)
103
Emilia Kasperf7ecb0d2016-10-14 15:58:23 +0200104# Generates SpongyCastleTest_1_xx target for all available versions,
105# plus a SpongyCastleTest alias for latest stable.
106#
107# To test latest stable:
108# $ bazel test SpongyCastleTest
109#
110# To test other versions, e.g., v1.52.0.0:
111# $ bazel test SpongyCastleTest_1_52
112#
113# To test all known versions:
114# $ bazel test SpongyCastleTest_*
115spongycastle_tests(
116 size = "large",
117 srcs = ["java/com/google/security/wycheproof/SpongyCastleTest.java"] + test_srcs,
118 test_class = "com.google.security.wycheproof.SpongyCastleTest",
119 deps = common_deps,
120)
121
Thai Duong189df202016-12-13 19:30:49 -0800122# OpenJDK tests
123java_test(
124 name = "OpenJDKTest",
125 size = "large",
126 srcs = ["java/com/google/security/wycheproof/OpenJDKTest.java"] + test_srcs,
127 test_class = "com.google.security.wycheproof.OpenJDKTest",
128 deps = common_deps,
129)
130
131java_test(
132 name = "OpenJDKAllTests",
133 size = "large",
134 srcs = ["java/com/google/security/wycheproof/OpenJDKAllTests.java"] + test_srcs,
135 test_class = "com.google.security.wycheproof.OpenJDKAllTests",
136 deps = common_deps,
137)
138
Emilia Kasperf7ecb0d2016-10-14 15:58:23 +0200139# Platform-independent tests
140java_test(
141 name = "ProviderIndependentTest",
142 size = "small",
143 srcs = ["java/com/google/security/wycheproof/ProviderIndependentTest.java"] + test_srcs,
144 deps = common_deps,
145)