|
1 #!/bin/sh |
|
2 # |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 # |
|
7 # runTests.sh |
|
8 # |
|
9 |
|
10 curdir=`pwd` |
|
11 cd ../common |
|
12 . ./libpkix_init.sh > /dev/null |
|
13 cd ${curdir} |
|
14 |
|
15 testunit="PKIX" |
|
16 |
|
17 totalErrors=0 |
|
18 utilErrors=0 |
|
19 crlselErrors=0 |
|
20 paramsErrors=0 |
|
21 resultsErrors=0 |
|
22 topErrors=0 |
|
23 checkerErrors=0 |
|
24 certselErrors=0 |
|
25 quiet=0 |
|
26 |
|
27 checkMemArg="" |
|
28 arenasArg="" |
|
29 quietArg="" |
|
30 memText="" |
|
31 |
|
32 ### ParseArgs |
|
33 ParseArgs() # args |
|
34 { |
|
35 while [ $# -gt 0 ]; do |
|
36 if [ $1 = "-checkmem" ]; then |
|
37 checkMemArg=$1 |
|
38 memText=" (Memory Checking Enabled)" |
|
39 elif [ $1 = "-quiet" ]; then |
|
40 quietArg=$1 |
|
41 quiet=1 |
|
42 elif [ $1 = "-arenas" ]; then |
|
43 arenasArg=$1 |
|
44 fi |
|
45 shift |
|
46 done |
|
47 } |
|
48 |
|
49 ParseArgs $* |
|
50 |
|
51 testHeadingEcho |
|
52 |
|
53 echo "RUNNING tests in certsel"; |
|
54 cd certsel; |
|
55 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
56 certselErrors=$? |
|
57 |
|
58 echo "RUNNING tests in checker"; |
|
59 cd ../checker; |
|
60 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
61 checkerErrors=$? |
|
62 |
|
63 echo "RUNNING tests in results"; |
|
64 cd ../results; |
|
65 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
66 resultsErrors=$? |
|
67 |
|
68 echo "RUNNING tests in params"; |
|
69 cd ../params; |
|
70 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
71 paramsErrors=$? |
|
72 |
|
73 echo "RUNNING tests in crlsel"; |
|
74 cd ../crlsel; |
|
75 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
76 crlselErrors=$? |
|
77 |
|
78 echo "RUNNING tests in store"; |
|
79 cd ../store; |
|
80 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
81 storeErrors=$? |
|
82 |
|
83 echo "RUNNING tests in util"; |
|
84 cd ../util; |
|
85 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
86 utilErrors=$? |
|
87 |
|
88 echo "RUNNING tests in top"; |
|
89 cd ../top; |
|
90 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} |
|
91 topErrors=$? |
|
92 |
|
93 totalErrors=`expr ${certselErrors} + ${checkerErrors} + ${resultsErrors} + ${paramsErrors} + ${crlselErrors} + ${storeErrors} + ${utilErrors} + ${topErrors}` |
|
94 |
|
95 testEndingEcho |
|
96 |
|
97 exit ${totalErrors} |
|
98 |