1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/tests/cmdtests/cmdtests.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,101 @@ 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 +######################################################################## 1.11 +# Script to run small tests to test specific crashes of NSS 1.12 +# 1.13 +# needs to work on all Unix and Windows platforms 1.14 +# 1.15 +# included from 1.16 +# -------------- 1.17 +# all.sh 1.18 +# 1.19 +# tests implemented: 1.20 +# vercrt (verify encryption cert - bugzilla bug 119059) 1.21 +# vercrtfps (verify encryption cert in fips mode - bugzilla bug 119214) 1.22 +# test3 (CERT_FindUserCertByUsage called 2nd time - bug 118864) 1.23 +# 1.24 +# special strings 1.25 +# --------------- 1.26 +# 1.27 +######################################################################## 1.28 + 1.29 +############################## cmdtests_init ########################### 1.30 +# local shell function to initialize this script 1.31 +######################################################################## 1.32 +cmdtests_init() 1.33 +{ 1.34 + SCRIPTNAME=cmdtests.sh # sourced - $0 would point to all.sh 1.35 + 1.36 + if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for 1.37 + CLEANUP="${SCRIPTNAME}" # cleaning this script will do it 1.38 + fi 1.39 + 1.40 + if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then 1.41 + cd ../common 1.42 + . ./init.sh 1.43 + fi 1.44 + if [ ! -r $CERT_LOG_FILE ]; then # we need certificates here 1.45 + cd ../cert 1.46 + . ./cert.sh 1.47 + fi 1.48 + SCRIPTNAME=cmdtests.sh 1.49 + html_head "Tests in cmd/tests" 1.50 + 1.51 +# grep "SUCCESS: cmd/tests passed" $CERT_LOG_FILE >/dev/null || { 1.52 +# Exit 15 "Fatal - cert.sh needs to pass first" 1.53 +# } 1.54 + 1.55 + CMDTESTSDIR=${HOSTDIR}/cmd/tests 1.56 + COPYDIR=${CMDTESTSDIR}/copydir 1.57 + 1.58 + R_CMDTESTSDIR=../cmd/tests 1.59 + R_COPYDIR=../cmd/tests/copydir 1.60 + P_R_COPYDIR=${R_COPYDIR} 1.61 + 1.62 + if [ -n "${MULTIACCESS_DBM}" ]; then 1.63 + P_R_COPYDIR="multiaccess:Cmdtests.$version" 1.64 + fi 1.65 + 1.66 + mkdir -p ${CMDTESTSDIR} 1.67 + mkdir -p ${COPYDIR} 1.68 + mkdir -p ${CMDTESTSDIR}/html 1.69 + 1.70 + cd ${CMDTESTSDIR} 1.71 +} 1.72 + 1.73 +############################## ct_vercrt ################################## 1.74 +# CERT_VerifyCert should not fail when verifying encryption cert 1.75 +# Bugzilla Bug 119059 1.76 +######################################################################## 1.77 +#ct_vercrt() 1.78 +#{ 1.79 + # echo "$SCRIPTNAME: Verify encryption certificate ----------------------" 1.80 + # echo "vercrt" 1.81 + # vercrt 1.82 + # ret=$? 1.83 + # html_msg $ret 0 "Verify encryption certificate (vercrt)" 1.84 +# 1.85 +#} 1.86 + 1.87 + 1.88 +############################## cmdtests_cleanup ######################## 1.89 +# local shell function to finish this script (no exit since it might be 1.90 +# sourced) 1.91 +######################################################################## 1.92 +cmdtests_cleanup() 1.93 +{ 1.94 + html "</TABLE><BR>" 1.95 + cd ${QADIR} 1.96 + . common/cleanup.sh 1.97 +} 1.98 + 1.99 +################## main ################################################# 1.100 + 1.101 +cmdtests_init 1.102 + 1.103 +#ct_vercrt 1.104 +cmdtests_cleanup