diff --git a/security/nss/tests/cert/cert.sh b/security/nss/tests/cert/cert.sh index c8a0b8bf0e6..05bcf4d512f 100755 --- a/security/nss/tests/cert/cert.sh +++ b/security/nss/tests/cert/cert.sh @@ -25,23 +25,21 @@ ######################################################################## if [ -z "${INIT_SOURCED}" ] ; then - . ../common/init.sh + cd ../common + . init.sh +fi +SCRIPTNAME="cert.sh" +if [ -z "${CLEANUP}" ] ; then + CLEANUP="${SCRIPTNAME}" fi -TEMPFILES="${PWFILE} ${CERTSCRIPT} ${NOISE_FILE}" - -trap "rm -f ${TEMPFILES}; Exit $0 Signal_caught" 2 3 certlog() ###################### write the cert_status file { + echo "$SCRIPTNAME $*" echo $* >>${CERT_LOG_FILE} } -html() ######################### write the results.html file -{ - echo $* >>${RESULTS} -} - ################################ noise ################################## # Generate noise for our certs # @@ -76,10 +74,10 @@ certu() RET=$? if [ "$RET" -ne 0 ]; then CERTFAILED=$RET - html "${CU_ACTION} ($RET) $CU_FAILED" + html_failed "${CU_ACTION} ($RET) " certlog "ERROR: ${CU_ACTION} failed $RET" else - html "${CU_ACTION}$CU_PASSED" + html_passed "${CU_ACTION}" fi return $RET } @@ -153,7 +151,7 @@ create_cert() ################## main ################################################# -certlog "started" +certlog "********************** running $SCRIPTNAME **********************" html "" html "" @@ -280,11 +278,13 @@ if [ "$CERTFAILED" != 0 ] ; then else certlog "SUCCESS: SSL passed" fi -certlog "finished" -echo "
Certutil Tests
Test CaseResult

" >> ${RESULTS} +certlog "********************** finished $SCRIPTNAME **********************" +html "
" + +cd ${CURDIR} +. ../common/cleanup.sh -rm -f ${TEMPFILES} # we will probably need mor for the tools # tools.sh: generates an alice cert in a "Cert" directory