mirrored from https://www.bouncycastle.org/repositories/bc-lts-java
-
Notifications
You must be signed in to change notification settings - Fork 5
/
mod_all_test_unsigned.sh
executable file
·84 lines (63 loc) · 2.93 KB
/
mod_all_test_unsigned.sh
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
#!/usr/bin/env bash
version=`fgrep version gradle.properties | sed -e "s/version=//"`
rm -rf mtest
mkdir mtest
artifactsHome=build/libs/
tj=( $artifactsHome/*tests.jar )
testJar="${tj[0]}";
prefixes=("bcprov-lts8on" "bcpkix-lts8on" "bctls-lts8on" "bcutil-lts8on" "bcpg-lts8on" "bcmail-lts8on")
for str in "${prefixes[@]}"; do
src="jars/${str}-${version}.jar"
echo $src
cp "${src}" mtest/
done
a=(`$JAVA_HOME/bin/jar -tf "$testJar" | grep -E "AllTests\.class" | sed -e 's!.class!!' | sed -e 's|/|.|g'`);
rm -rf /tmp/bc-libs
mkdir /tmp/bc-libs
export DYLIB_LIBRARY_PATH=/tmp/bc-libs
export LD_LIBRARY_PATH=/tmp/bc-libs
echo ""
java \
--module-path mtest \
org.bouncycastle.util.DumpInfo
echo ""
for i in "${a[@]}"
do
echo $i
java --module-path mtest \
--add-modules org.bouncycastle.lts.mail \
--add-modules org.bouncycastle.lts.pg \
--add-modules org.bouncycastle.lts.pkix \
--add-modules org.bouncycastle.lts.prov \
--add-modules org.bouncycastle.lts.tls \
--add-modules org.bouncycastle.lts.util \
--add-opens org.bouncycastle.lts.prov/org.bouncycastle.jcajce.provider.symmetric=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.prov/org.bouncycastle.jcajce.provider.digest=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.asn1.cmc=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.prov/org.bouncycastle.internal.asn1.cms=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.prov/org.bouncycastle.internal.asn1.bsi=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.prov/org.bouncycastle.internal.asn1.eac=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.prov/org.bouncycastle.internal.asn1.isismtt=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.oer.its.etsi102941.basetypes=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.oer.its.etsi102941=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.oer.its.ieee1609dot2dot1=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.oer.its.etsi103097.extension=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.oer.its.etsi103097=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.oer.its.ieee1609dot2.basetypes=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.util/org.bouncycastle.oer.its.ieee1609dot2=ALL-UNNAMED \
--add-opens org.bouncycastle.lts.pkix/org.bouncycastle.tsp=ALL-UNNAMED \
--add-reads org.bouncycastle.lts.mail=ALL-UNNAMED \
--add-reads org.bouncycastle.lts.prov=ALL-UNNAMED \
--add-reads org.bouncycastle.lts.mail=ALL-UNNAMED \
-cp "$testJar:libs/junit.jar:libs/activation.jar:libs/mail.jar" \
-Dbc.test.data.home=core/src/test/data \
"$i"
if [[ $? != 0 ]]; then
echo ""
echo "--------------------------------!!!"
echo "$i failed"
exit 1;
fi
echo "-------------------------------------"
echo ""
done