michael@0: #!/bin/sh michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: # michael@0: # runTests.sh michael@0: # michael@0: michael@0: curdir=`pwd` michael@0: cd ../common michael@0: . ./libpkix_init.sh > /dev/null michael@0: cd ${curdir} michael@0: michael@0: testunit="PKIX" michael@0: michael@0: totalErrors=0 michael@0: utilErrors=0 michael@0: crlselErrors=0 michael@0: paramsErrors=0 michael@0: resultsErrors=0 michael@0: topErrors=0 michael@0: checkerErrors=0 michael@0: certselErrors=0 michael@0: quiet=0 michael@0: michael@0: checkMemArg="" michael@0: arenasArg="" michael@0: quietArg="" michael@0: memText="" michael@0: michael@0: ### ParseArgs michael@0: ParseArgs() # args michael@0: { michael@0: while [ $# -gt 0 ]; do michael@0: if [ $1 = "-checkmem" ]; then michael@0: checkMemArg=$1 michael@0: memText=" (Memory Checking Enabled)" michael@0: elif [ $1 = "-quiet" ]; then michael@0: quietArg=$1 michael@0: quiet=1 michael@0: elif [ $1 = "-arenas" ]; then michael@0: arenasArg=$1 michael@0: fi michael@0: shift michael@0: done michael@0: } michael@0: michael@0: ParseArgs $* michael@0: michael@0: testHeadingEcho michael@0: michael@0: echo "RUNNING tests in certsel"; michael@0: cd certsel; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: certselErrors=$? michael@0: michael@0: echo "RUNNING tests in checker"; michael@0: cd ../checker; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: checkerErrors=$? michael@0: michael@0: echo "RUNNING tests in results"; michael@0: cd ../results; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: resultsErrors=$? michael@0: michael@0: echo "RUNNING tests in params"; michael@0: cd ../params; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: paramsErrors=$? michael@0: michael@0: echo "RUNNING tests in crlsel"; michael@0: cd ../crlsel; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: crlselErrors=$? michael@0: michael@0: echo "RUNNING tests in store"; michael@0: cd ../store; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: storeErrors=$? michael@0: michael@0: echo "RUNNING tests in util"; michael@0: cd ../util; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: utilErrors=$? michael@0: michael@0: echo "RUNNING tests in top"; michael@0: cd ../top; michael@0: runTests.sh ${arenasArg} ${checkMemArg} ${quietArg} michael@0: topErrors=$? michael@0: michael@0: totalErrors=`expr ${certselErrors} + ${checkerErrors} + ${resultsErrors} + ${paramsErrors} + ${crlselErrors} + ${storeErrors} + ${utilErrors} + ${topErrors}` michael@0: michael@0: testEndingEcho michael@0: michael@0: exit ${totalErrors} michael@0: