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######################################################################## 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######################################################################## 25 26############################## cmdtests_init ########################### 27# local shell function to initialize this script 28######################################################################## 29cmdtests_init() 30{ 31 SCRIPTNAME=cmdtests.sh # sourced - $0 would point to all.sh 32 33 if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for 34 CLEANUP="${SCRIPTNAME}" # cleaning this script will do it 35 fi 36 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" 47 48# grep "SUCCESS: cmd/tests passed" $CERT_LOG_FILE >/dev/null || { 49# Exit 15 "Fatal - cert.sh needs to pass first" 50# } 51 52 CMDTESTSDIR=${HOSTDIR}/cmd/tests 53 COPYDIR=${CMDTESTSDIR}/copydir 54 55 R_CMDTESTSDIR=../cmd/tests 56 R_COPYDIR=../cmd/tests/copydir 57 P_R_COPYDIR=${R_COPYDIR} 58 59 if [ -n "${MULTIACCESS_DBM}" ]; then 60 P_R_COPYDIR="multiaccess:Cmdtests.$version" 61 fi 62 63 mkdir -p ${CMDTESTSDIR} 64 mkdir -p ${COPYDIR} 65 mkdir -p ${CMDTESTSDIR}/html 66 67 cd ${CMDTESTSDIR} 68} 69 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#} 83 84 85############################## cmdtests_cleanup ######################## 86# local shell function to finish this script (no exit since it might be 87# sourced) 88######################################################################## 89cmdtests_cleanup() 90{ 91 html "</TABLE><BR>" 92 cd ${QADIR} 93 . common/cleanup.sh 94} 95 96################## main ################################################# 97 98cmdtests_init 99 100#ct_vercrt 101cmdtests_cleanup 102