blob: 61858bd6351342124b050c8174c3c0237d40c07c [file] [log] [blame]
Peter Dettmanfa01b5a2017-02-04 01:49:56 +07001bouncycastle_versions = range(49, 57)
Emilia Kasperf7ecb0d2016-10-14 15:58:23 +02002
3# These targets run all tests.
4def bouncycastle_all_tests(srcs, deps, size, test_class):
5 """BouncyCastle version-specific tests."""
6
Peter Dettmanfa01b5a2017-02-04 01:49:56 +07007 # Generates BouncyCastleAllTests_1_56, ..., BouncyCastleAllTests_1_49
Emilia Kasperf7ecb0d2016-10-14 15:58:23 +02008 for version in bouncycastle_versions:
9 native.java_test(
10 name = "BouncyCastleAllTests_1_%s" % version,
11 srcs = srcs,
12 deps = deps + [
13 "@bouncycastle_1_%s//jar" % version,
14 ],
15 size = size,
16 test_class = test_class,
17 )
18
19 # Latest stable.
20 # We can't use native.alias, because aliased tests are not run.
21 # So, we simply duplicate the test.
22 native.java_test(
23 name = "BouncyCastleAllTests",
24 srcs = srcs,
25 deps = deps + ["@bouncycastle_1_%s//jar" % max(bouncycastle_versions)],
26 size = size,
27 test_class = test_class,
28 )
29
30# These targets exclude slow tests.
31def bouncycastle_tests(srcs, deps, size, test_class):
32 """BouncyCastle version-specific tests."""
33
Peter Dettmanfa01b5a2017-02-04 01:49:56 +070034 # Generates BouncyCastleTest_1_56, ..., BouncyCastleTest_1_49
Emilia Kasperf7ecb0d2016-10-14 15:58:23 +020035 for version in bouncycastle_versions:
36 native.java_test(
37 name = "BouncyCastleTest_1_%s" % version,
38 srcs = srcs,
39 deps = deps + [
40 "@bouncycastle_1_%s//jar" % version,
41 ],
42 size = size,
43 test_class = test_class,
44 )
45
46 # Latest stable.
47 # We can't use native.alias, because aliased tests are not run.
48 # So, we simply duplicate the test.
49 native.java_test(
50 name = "BouncyCastleTest",
51 srcs = srcs,
52 deps = deps + ["@bouncycastle_1_%s//jar" % max(bouncycastle_versions)],
53 size = size,
54 test_class = test_class,
55 )
56
57spongycastle_versions = range(50, 55)
58
59# These targets run all tests.
60def spongycastle_all_tests(srcs, deps, size, test_class):
61 """SpongyCastle version-specific tests."""
62
63 # Generates SpongyCastleAllTests_1_54, ..., SpongyCastleAllTests_1_50
64 for version in spongycastle_versions:
65 native.java_test(
66 name = "SpongyCastleAllTests_1_%s" % version,
67 srcs = srcs,
68 deps = deps + [
69 "@spongycastle_core_1_%s//jar" % version,
70 "@spongycastle_prov_1_%s//jar" % version,
71 ],
72 size = size,
73 test_class = test_class,
74 )
75
76 # Latest stable.
77 # We can't use native.alias, because aliased tests are not run.
78 # So, we simply duplicate the test.
79 native.java_test(
80 name = "SpongyCastleAllTests",
81 srcs = srcs,
82 deps = deps + [
83 "@spongycastle_core_1_%s//jar" % max(spongycastle_versions),
84 "@spongycastle_prov_1_%s//jar" % max(spongycastle_versions),
85 ],
86 size = size,
87 test_class = test_class,
88 )
89
90# These targets exclude slow tests.
91def spongycastle_tests(srcs, deps, size, test_class):
92 """SpongyCastle version-specific tests."""
93
94 # Generates SpongyCastleTest_1_54, ..., SpongyCastleTest_1_50
95 for version in spongycastle_versions:
96 native.java_test(
97 name = "SpongyCastleTest_1_%s" % version,
98 srcs = srcs,
99 deps = deps + [
100 "@spongycastle_core_1_%s//jar" % version,
101 "@spongycastle_prov_1_%s//jar" % version,
102 ],
103 size = size,
104 test_class = test_class,
105 )
106
107 # Latest stable.
108 # We can't use native.alias, because aliased tests are not run.
109 # So, we simply duplicate the test.
110 native.java_test(
111 name = "SpongyCastleTest",
112 srcs = srcs,
113 deps = deps + [
114 "@spongycastle_core_1_%s//jar" % max(spongycastle_versions),
115 "@spongycastle_prov_1_%s//jar" % max(spongycastle_versions),
116 ],
117 size = size,
118 test_class = test_class,
119 )