security/nss/tests/libpkix/runTests.sh

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rwxr-xr-x

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 # This script enables all tests to be run together. It simply cd's into
    10 # the pkix_tests and pkix_pl_tests directories and runs test scripts
    11 #
    12 # This test is the original of libpkix.sh. While libpkix.sh is invoked by
    13 # all.sh as a /bin/sh script, runTests.sh is a /bin/ksh and provides the
    14 # options of checking memory and using different memory allcation schemes.
    15 #
    17 errors=0
    18 pkixErrors=0
    19 pkixplErrors=0
    20 checkMemArg=""
    21 arenasArg=""
    22 quietArg=""
    23 memText=""
    25 ### ParseArgs
    26 ParseArgs() # args
    27 {
    28     while [ $# -gt 0 ]; do
    29 	if [ $1 = "-checkmem" ]; then
    30 	    checkMemArg=$1
    31 	    memText="   (Memory Checking Enabled)"
    32 	elif [ $1 = "-quiet" ]; then
    33 	    quietArg=$1
    34 	elif [ $1 = "-arenas" ]; then
    35 	    arenasArg=$1
    36 	fi
    37 	shift
    38     done
    39 }
    41 ParseArgs $*
    43 echo "*******************************************************************************"
    44 echo "START OF ALL TESTS${memText}"
    45 echo "*******************************************************************************"
    46 echo ""
    48 echo "RUNNING tests in pkix_pl_test";
    49 cd pkix_pl_tests;
    50 runPLTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
    51 pkixplErrors=$?
    53 echo "RUNNING tests in pkix_test";
    54 cd ../pkix_tests;
    55 runTests.sh ${arenasArg} ${checkMemArg} ${quietArg}
    56 pkixErrors=$?
    58 echo "RUNNING tests in sample_apps (performance)";
    59 cd ../sample_apps;
    60 runPerf.sh ${arenasArg} ${checkMemArg} ${quietArg}
    61 pkixPerfErrors=$?
    63 errors=`expr ${pkixplErrors} + ${pkixErrors} + ${pkixPerfErrors}`
    65 if [ ${errors} -eq 0 ]; then
    66     echo ""
    67     echo "************************************************************"
    68     echo "END OF ALL TESTS: ALL TESTS COMPLETED SUCCESSFULLY"
    69     echo "************************************************************"
    70     exit 0
    71 fi
    73 if [ ${errors} -eq 1 ]; then
    74     plural=""
    75 else
    76     plural="S"
    77 fi
    79 echo ""
    80 echo "************************************************************"
    81 echo "END OF ALL TESTS: ${errors} TEST${plural} FAILED"
    82 echo "************************************************************"
    83 exit 1

mercurial