Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 #
10 curdir=`pwd`
11 cd ../common
12 . ./libpkix_init.sh > /dev/null
13 cd ${curdir}
15 testunit="PKIX"
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
27 checkMemArg=""
28 arenasArg=""
29 quietArg=""
30 memText=""
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 }
49 ParseArgs $*
51 testHeadingEcho
53 echo "RUNNING tests in certsel";
54 cd certsel;
55 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
56 certselErrors=$?
58 echo "RUNNING tests in checker";
59 cd ../checker;
60 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
61 checkerErrors=$?
63 echo "RUNNING tests in results";
64 cd ../results;
65 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
66 resultsErrors=$?
68 echo "RUNNING tests in params";
69 cd ../params;
70 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
71 paramsErrors=$?
73 echo "RUNNING tests in crlsel";
74 cd ../crlsel;
75 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
76 crlselErrors=$?
78 echo "RUNNING tests in store";
79 cd ../store;
80 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
81 storeErrors=$?
83 echo "RUNNING tests in util";
84 cd ../util;
85 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
86 utilErrors=$?
88 echo "RUNNING tests in top";
89 cd ../top;
90 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
91 topErrors=$?
93 totalErrors=`expr ${certselErrors} + ${checkerErrors} + ${resultsErrors} + ${paramsErrors} + ${crlselErrors} + ${storeErrors} + ${utilErrors} + ${topErrors}`
95 testEndingEcho
97 exit ${totalErrors}