michael@0: #! /bin/sh michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: ######################################################################## michael@0: # Script to run small tests to test specific crashes of NSS michael@0: # michael@0: # needs to work on all Unix and Windows platforms michael@0: # michael@0: # included from michael@0: # -------------- michael@0: # all.sh michael@0: # michael@0: # tests implemented: michael@0: # vercrt (verify encryption cert - bugzilla bug 119059) michael@0: # vercrtfps (verify encryption cert in fips mode - bugzilla bug 119214) michael@0: # test3 (CERT_FindUserCertByUsage called 2nd time - bug 118864) michael@0: # michael@0: # special strings michael@0: # --------------- michael@0: # michael@0: ######################################################################## michael@0: michael@0: ############################## cmdtests_init ########################### michael@0: # local shell function to initialize this script michael@0: ######################################################################## michael@0: cmdtests_init() michael@0: { michael@0: SCRIPTNAME=cmdtests.sh # sourced - $0 would point to all.sh michael@0: michael@0: if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for michael@0: CLEANUP="${SCRIPTNAME}" # cleaning this script will do it michael@0: fi michael@0: michael@0: if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then michael@0: cd ../common michael@0: . ./init.sh michael@0: fi michael@0: if [ ! -r $CERT_LOG_FILE ]; then # we need certificates here michael@0: cd ../cert michael@0: . ./cert.sh michael@0: fi michael@0: SCRIPTNAME=cmdtests.sh michael@0: html_head "Tests in cmd/tests" michael@0: michael@0: # grep "SUCCESS: cmd/tests passed" $CERT_LOG_FILE >/dev/null || { michael@0: # Exit 15 "Fatal - cert.sh needs to pass first" michael@0: # } michael@0: michael@0: CMDTESTSDIR=${HOSTDIR}/cmd/tests michael@0: COPYDIR=${CMDTESTSDIR}/copydir michael@0: michael@0: R_CMDTESTSDIR=../cmd/tests michael@0: R_COPYDIR=../cmd/tests/copydir michael@0: P_R_COPYDIR=${R_COPYDIR} michael@0: michael@0: if [ -n "${MULTIACCESS_DBM}" ]; then michael@0: P_R_COPYDIR="multiaccess:Cmdtests.$version" michael@0: fi michael@0: michael@0: mkdir -p ${CMDTESTSDIR} michael@0: mkdir -p ${COPYDIR} michael@0: mkdir -p ${CMDTESTSDIR}/html michael@0: michael@0: cd ${CMDTESTSDIR} michael@0: } michael@0: michael@0: ############################## ct_vercrt ################################## michael@0: # CERT_VerifyCert should not fail when verifying encryption cert michael@0: # Bugzilla Bug 119059 michael@0: ######################################################################## michael@0: #ct_vercrt() michael@0: #{ michael@0: # echo "$SCRIPTNAME: Verify encryption certificate ----------------------" michael@0: # echo "vercrt" michael@0: # vercrt michael@0: # ret=$? michael@0: # html_msg $ret 0 "Verify encryption certificate (vercrt)" michael@0: # michael@0: #} michael@0: michael@0: michael@0: ############################## cmdtests_cleanup ######################## michael@0: # local shell function to finish this script (no exit since it might be michael@0: # sourced) michael@0: ######################################################################## michael@0: cmdtests_cleanup() michael@0: { michael@0: html "
" michael@0: cd ${QADIR} michael@0: . common/cleanup.sh michael@0: } michael@0: michael@0: ################## main ################################################# michael@0: michael@0: cmdtests_init michael@0: michael@0: #ct_vercrt michael@0: cmdtests_cleanup