~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/security/nss/tests/cmdtests/cmdtests.sh

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh  
 
2
#
 
3
# The contents of this file are subject to the Mozilla Public
 
4
# License Version 1.1 (the "License"); you may not use this file
 
5
# except in compliance with the License. You may obtain a copy of
 
6
# the License at http://www.mozilla.org/MPL/
 
7
 
8
# Software distributed under the License is distributed on an "AS
 
9
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
10
# implied. See the License for the specific language governing
 
11
# rights and limitations under the License.
 
12
 
13
# The Original Code is the Netscape security libraries.
 
14
 
15
# The Initial Developer of the Original Code is Netscape
 
16
# Communications Corporation.  Portions created by Netscape are 
 
17
# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
 
18
# Rights Reserved.
 
19
 
20
# Contributor(s):
 
21
 
22
# Alternatively, the contents of this file may be used under the
 
23
# terms of the GNU General Public License Version 2 or later (the
 
24
# "GPL"), in which case the provisions of the GPL are applicable 
 
25
# instead of those above.  If you wish to allow use of your 
 
26
# version of this file only under the terms of the GPL and not to
 
27
# allow others to use your version of this file under the MPL,
 
28
# indicate your decision by deleting the provisions above and
 
29
# replace them with the notice and other provisions required by
 
30
# the GPL.  If you do not delete the provisions above, a recipient
 
31
# may use your version of this file under either the MPL or the
 
32
# GPL.
 
33
#
 
34
#
 
35
########################################################################
 
36
#
 
37
# mozilla/security/nss/cmd/tests/cmdtests.sh
 
38
#
 
39
# Script to run small tests to test specific crashes of NSS
 
40
#
 
41
# needs to work on all Unix and Windows platforms
 
42
#
 
43
# included from 
 
44
# --------------
 
45
#   all.sh
 
46
#
 
47
# tests implemented:
 
48
# vercrt (verify encryption cert - bugzilla bug 119059)
 
49
# vercrtfps (verify encryption cert in fips mode - bugzilla bug 119214)
 
50
# test3 (CERT_FindUserCertByUsage called 2nd time - bug 118864)
 
51
#
 
52
# special strings
 
53
# ---------------
 
54
#
 
55
########################################################################
 
56
 
 
57
############################## cmdtests_init ###########################
 
58
# local shell function to initialize this script 
 
59
########################################################################
 
60
cmdtests_init()
 
61
{
 
62
  SCRIPTNAME=cmdtests.sh      # sourced - $0 would point to all.sh
 
63
 
 
64
  if [ -z "${CLEANUP}" ] ; then     # if nobody else is responsible for
 
65
      CLEANUP="${SCRIPTNAME}"       # cleaning this script will do it
 
66
  fi
 
67
 
 
68
  if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
 
69
      cd ../common
 
70
      . ./init.sh
 
71
  fi
 
72
  if [ ! -r $CERT_LOG_FILE ]; then  # we need certificates here
 
73
      cd ../cert
 
74
      . ./cert.sh
 
75
  fi
 
76
  SCRIPTNAME=cmdtests.sh
 
77
  html_head "Tests in cmd/tests"
 
78
 
 
79
# grep "SUCCESS: cmd/tests passed" $CERT_LOG_FILE >/dev/null || {
 
80
#     Exit 15 "Fatal - cert.sh needs to pass first"
 
81
# }
 
82
 
 
83
  CMDTESTSDIR=${HOSTDIR}/cmd/tests
 
84
  COPYDIR=${CMDTESTSDIR}/copydir
 
85
 
 
86
  R_CMDTESTSDIR=../cmd/tests
 
87
  R_COPYDIR=../cmd/tests/copydir
 
88
  P_R_COPYDIR=${R_COPYDIR}
 
89
 
 
90
  if [ -n "${MULTIACCESS_DBM}" ]; then
 
91
     P_R_COPYDIR="multiaccess:Cmdtests.$version"
 
92
  fi
 
93
 
 
94
  mkdir -p ${CMDTESTSDIR}
 
95
  mkdir -p ${COPYDIR}
 
96
  mkdir -p ${CMDTESTSDIR}/html
 
97
 
 
98
  cd ${CMDTESTSDIR}
 
99
}
 
100
 
 
101
############################## ct_vercrt ##################################
 
102
# CERT_VerifyCert should not fail when verifying encryption cert 
 
103
# Bugzilla Bug 119059
 
104
########################################################################
 
105
#ct_vercrt()
 
106
#{
 
107
 # echo "$SCRIPTNAME: Verify encryption certificate ----------------------"
 
108
 # echo "vercrt"
 
109
 # vercrt
 
110
 # ret=$?
 
111
 # html_msg $ret 0 "Verify encryption certificate (vercrt)"
 
112
#
 
113
#}
 
114
 
 
115
 
 
116
############################## cmdtests_cleanup ########################
 
117
# local shell function to finish this script (no exit since it might be 
 
118
# sourced)
 
119
########################################################################
 
120
cmdtests_cleanup()
 
121
{
 
122
  html "</TABLE><BR>"
 
123
  cd ${QADIR}
 
124
  . common/cleanup.sh
 
125
}
 
126
 
 
127
################## main #################################################
 
128
 
 
129
cmdtests_init
 
130
 
 
131
#ct_vercrt
 
132
cmdtests_cleanup