security/nss/tests/libpkix/runTests.sh

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/tests/libpkix/runTests.sh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,87 @@
     1.4 +#! /bin/sh
     1.5 +#
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +#
    1.10 +# runTests.sh#
    1.11 +#
    1.12 +# This script enables all tests to be run together. It simply cd's into
    1.13 +# the pkix_tests and pkix_pl_tests directories and runs test scripts
    1.14 +#
    1.15 +# This test is the original of libpkix.sh. While libpkix.sh is invoked by
    1.16 +# all.sh as a /bin/sh script, runTests.sh is a /bin/ksh and provides the
    1.17 +# options of checking memory and using different memory allcation schemes.
    1.18 +#
    1.19 +
    1.20 +errors=0
    1.21 +pkixErrors=0
    1.22 +pkixplErrors=0
    1.23 +checkMemArg=""
    1.24 +arenasArg=""
    1.25 +quietArg=""
    1.26 +memText=""
    1.27 +
    1.28 +### ParseArgs
    1.29 +ParseArgs() # args
    1.30 +{
    1.31 +    while [ $# -gt 0 ]; do
    1.32 +	if [ $1 = "-checkmem" ]; then
    1.33 +	    checkMemArg=$1
    1.34 +	    memText="   (Memory Checking Enabled)"
    1.35 +	elif [ $1 = "-quiet" ]; then
    1.36 +	    quietArg=$1
    1.37 +	elif [ $1 = "-arenas" ]; then
    1.38 +	    arenasArg=$1
    1.39 +	fi
    1.40 +	shift
    1.41 +    done
    1.42 +}
    1.43 +
    1.44 +ParseArgs $*
    1.45 +
    1.46 +echo "*******************************************************************************"
    1.47 +echo "START OF ALL TESTS${memText}"
    1.48 +echo "*******************************************************************************"
    1.49 +echo ""
    1.50 +
    1.51 +echo "RUNNING tests in pkix_pl_test";
    1.52 +cd pkix_pl_tests;
    1.53 +runPLTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
    1.54 +pkixplErrors=$?
    1.55 +
    1.56 +echo "RUNNING tests in pkix_test";
    1.57 +cd ../pkix_tests;
    1.58 +runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
    1.59 +pkixErrors=$?
    1.60 +
    1.61 +echo "RUNNING tests in sample_apps (performance)";
    1.62 +cd ../sample_apps;
    1.63 +runPerf.sh ${arenasArg} ${checkMemArg} ${quietArg}
    1.64 +pkixPerfErrors=$?
    1.65 +
    1.66 +errors=`expr ${pkixplErrors} + ${pkixErrors} + ${pkixPerfErrors}`
    1.67 +
    1.68 +if [ ${errors} -eq 0 ]; then
    1.69 +    echo ""
    1.70 +    echo "************************************************************"
    1.71 +    echo "END OF ALL TESTS: ALL TESTS COMPLETED SUCCESSFULLY"
    1.72 +    echo "************************************************************"
    1.73 +    exit 0
    1.74 +fi
    1.75 +
    1.76 +if [ ${errors} -eq 1 ]; then
    1.77 +    plural=""
    1.78 +else
    1.79 +    plural="S"
    1.80 +fi
    1.81 +
    1.82 +echo ""
    1.83 +echo "************************************************************"
    1.84 +echo "END OF ALL TESTS: ${errors} TEST${plural} FAILED"
    1.85 +echo "************************************************************"
    1.86 +exit 1
    1.87 +
    1.88 +
    1.89 +
    1.90 +

mercurial