security/nss/tests/cmdtests/cmdtests.sh

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

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/.
     7 ########################################################################
     8 # Script to run small tests to test specific crashes of NSS
     9 #
    10 # needs to work on all Unix and Windows platforms
    11 #
    12 # included from 
    13 # --------------
    14 #   all.sh
    15 #
    16 # tests implemented:
    17 # vercrt (verify encryption cert - bugzilla bug 119059)
    18 # vercrtfps (verify encryption cert in fips mode - bugzilla bug 119214)
    19 # test3 (CERT_FindUserCertByUsage called 2nd time - bug 118864)
    20 #
    21 # special strings
    22 # ---------------
    23 #
    24 ########################################################################
    26 ############################## cmdtests_init ###########################
    27 # local shell function to initialize this script 
    28 ########################################################################
    29 cmdtests_init()
    30 {
    31   SCRIPTNAME=cmdtests.sh      # sourced - $0 would point to all.sh
    33   if [ -z "${CLEANUP}" ] ; then     # if nobody else is responsible for
    34       CLEANUP="${SCRIPTNAME}"       # cleaning this script will do it
    35   fi
    37   if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
    38       cd ../common
    39       . ./init.sh
    40   fi
    41   if [ ! -r $CERT_LOG_FILE ]; then  # we need certificates here
    42       cd ../cert
    43       . ./cert.sh
    44   fi
    45   SCRIPTNAME=cmdtests.sh
    46   html_head "Tests in cmd/tests"
    48 # grep "SUCCESS: cmd/tests passed" $CERT_LOG_FILE >/dev/null || {
    49 #     Exit 15 "Fatal - cert.sh needs to pass first"
    50 # }
    52   CMDTESTSDIR=${HOSTDIR}/cmd/tests
    53   COPYDIR=${CMDTESTSDIR}/copydir
    55   R_CMDTESTSDIR=../cmd/tests
    56   R_COPYDIR=../cmd/tests/copydir
    57   P_R_COPYDIR=${R_COPYDIR}
    59   if [ -n "${MULTIACCESS_DBM}" ]; then
    60      P_R_COPYDIR="multiaccess:Cmdtests.$version"
    61   fi
    63   mkdir -p ${CMDTESTSDIR}
    64   mkdir -p ${COPYDIR}
    65   mkdir -p ${CMDTESTSDIR}/html
    67   cd ${CMDTESTSDIR}
    68 }
    70 ############################## ct_vercrt ##################################
    71 # CERT_VerifyCert should not fail when verifying encryption cert 
    72 # Bugzilla Bug 119059
    73 ########################################################################
    74 #ct_vercrt()
    75 #{
    76  # echo "$SCRIPTNAME: Verify encryption certificate ----------------------"
    77  # echo "vercrt"
    78  # vercrt
    79  # ret=$?
    80  # html_msg $ret 0 "Verify encryption certificate (vercrt)"
    81 #
    82 #}
    85 ############################## cmdtests_cleanup ########################
    86 # local shell function to finish this script (no exit since it might be 
    87 # sourced)
    88 ########################################################################
    89 cmdtests_cleanup()
    90 {
    91   html "</TABLE><BR>"
    92   cd ${QADIR}
    93   . common/cleanup.sh
    94 }
    96 ################## main #################################################
    98 cmdtests_init
   100 #ct_vercrt
   101 cmdtests_cleanup

mercurial