Import from 1.9a8 tarball
[mozilla-nss.git] / security / nss / tests / libpkix / pkix_tests / runTests.sh
blobbbfcbb13663906892815848801748a2d8cbb1109
1 #!/bin/sh
2 #
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
16 # The Original Code is the Netscape security libraries.
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1994-2000
21 # the Initial Developer. All Rights Reserved.
23 # Contributor(s):
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 # runTests.sh
42 curdir=`pwd`
43 cd ../common
44 . ./libpkix_init.sh > /dev/null
45 cd ${curdir}
47 testunit="PKIX"
49 totalErrors=0
50 utilErrors=0
51 crlselErrors=0
52 paramsErrors=0
53 resultsErrors=0
54 topErrors=0
55 checkerErrors=0
56 certselErrors=0
57 quiet=0
59 checkMemArg=""
60 arenasArg=""
61 quietArg=""
62 memText=""
64 ### ParseArgs
65 ParseArgs() # args
67 while [ $# -gt 0 ]; do
68 if [ $1 = "-checkmem" ]; then
69 checkMemArg=$1
70 memText=" (Memory Checking Enabled)"
71 elif [ $1 = "-quiet" ]; then
72 quietArg=$1
73 quiet=1
74 elif [ $1 = "-arenas" ]; then
75 arenasArg=$1
77 shift
78 done
81 ParseArgs $*
83 testHeadingEcho
85 echo "RUNNING tests in certsel";
86 cd certsel;
87 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
88 certselErrors=$?
90 echo "RUNNING tests in checker";
91 cd ../checker;
92 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
93 checkerErrors=$?
95 echo "RUNNING tests in results";
96 cd ../results;
97 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
98 resultsErrors=$?
100 echo "RUNNING tests in params";
101 cd ../params;
102 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
103 paramsErrors=$?
105 echo "RUNNING tests in crlsel";
106 cd ../crlsel;
107 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
108 crlselErrors=$?
110 echo "RUNNING tests in store";
111 cd ../store;
112 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
113 storeErrors=$?
115 echo "RUNNING tests in util";
116 cd ../util;
117 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
118 utilErrors=$?
120 echo "RUNNING tests in top";
121 cd ../top;
122 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
123 topErrors=$?
125 totalErrors=`expr ${certselErrors} + ${checkerErrors} + ${resultsErrors} + ${paramsErrors} + ${crlselErrors} + ${storeErrors} + ${utilErrors} + ${topErrors}`
127 testEndingEcho
129 exit ${totalErrors}