3
# ***** BEGIN LICENSE BLOCK *****
4
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
6
# The contents of this file are subject to the Mozilla Public License Version
7
# 1.1 (the "License"); you may not use this file except in compliance with
8
# the License. You may obtain a copy of the License at
9
# http://www.mozilla.org/MPL/
11
# Software distributed under the License is distributed on an "AS IS" basis,
12
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13
# for the specific language governing rights and limitations under the
16
# The Original Code is the Network Security Services
18
# The Initial Developer of the Original Code is Sun Microsystems, Inc.
19
# Portions created by the Initial Developer are Copyright (C) 2007-2009
20
# Sun Microsystems, Inc. All Rights Reserved.
23
# Slavomir Katuscak <slavomir.katuscak@sun.com>, Sun Microsystems, Inc.
25
# Alternatively, the contents of this file may be used under the terms of
26
# either the GNU General Public License Version 2 or later (the "GPL"), or
27
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
# in which case the provisions of the GPL or the LGPL are applicable instead
29
# of those above. If you wish to allow use of your version of this file only
30
# under the terms of either the GPL or the LGPL, and not to allow others to
31
# use your version of this file under the terms of the MPL, indicate your
32
# decision by deleting the provisions above and replace them with the notice
33
# and other provisions required by the GPL or the LGPL. If you do not delete
34
# the provisions above, a recipient may use your version of this file under
35
# the terms of any one of the MPL, the GPL or the LGPL.
37
# ***** END LICENSE BLOCK *****
45
echo "Usage: $0 [securitytip|securityjes5]"
51
if [ "${BRANCH}" != "securitytip" -a "${BRANCH}" != "securityjes5" ]; then
52
echo "Usage: $0 [securitytip|securityjes5]"
56
COV_DIR="/share/builds/mccrel3/security/coverage"
57
BRANCH_DIR="${COV_DIR}/${BRANCH}"
58
DATE_DIR="${BRANCH_DIR}/${DATE}-${ARCH}"
59
CVS_DIR="${DATE_DIR}/cvs_mozilla"
60
TCOV_DIR="${DATE_DIR}/tcov_mozilla"
62
CVS_CHECKOUT_BRANCH="cvs_checkout_${BRANCH}"
64
export HOST=`hostname`
65
export DOMSUF=red.iplanet.com
67
export NSS_ENABLE_ECC=1
68
export NSS_ECC_MORE_THAN_SUITE_B=1
69
export IOPR_HOSTADDR_LIST="dochinups.red.iplanet.com"
70
export NSS_AIA_PATH="/share/builds/mccrel3/security/aia_certs"
71
export NSS_AIA_HTTP="http://cindercone.red.iplanet.com/share/builds/mccrel3/security/aia_certs"
74
export SUN_PROFDATA_DIR="${DATE_DIR}"
75
export SUN_PROFDATA="tcov_data"
77
if [ "${OS}" != "SunOS" ]; then
78
echo "OS not supported"
84
export PATH="/usr/dist/share/sunstudio_sparc,v12.0/SUNWspro/prod/bin:/usr/sfw/bin:/usr/bin:/usr/ccs/bin:/usr/ucb:/tools/ns/bin:/usr/local/bin"
87
export PATH="/usr/dist/share/sunstudio_i386,v12.0/SUNWspro/bin:/usr/sfw/bin:/usr/bin:/usr/ccs/bin:/usr/ucb:/tools/ns/bin:/usr/local/bin"
90
echo "Platform not supported"
95
cvs_checkout_securitytip()
97
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A mozilla/nsprpub
98
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A mozilla/dbm
99
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A mozilla/security/dbm
100
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A mozilla/security/coreconf
101
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A mozilla/security/nss
102
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A mozilla/security/jss
103
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r NSS_3_11_1_RTM mozilla/security/nss/lib/freebl/ecl/ecl-curve.h
106
cvs_checkout_securityjes5()
108
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r NSPR_4_6_BRANCH mozilla/nsprpub
109
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r NSS_3_11_BRANCH mozilla/dbm
110
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r NSS_3_11_BRANCH mozilla/security/dbm
111
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r NSS_3_11_BRANCH mozilla/security/coreconf
112
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r NSS_3_11_BRANCH mozilla/security/nss
113
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r JSS_4_2_BRANCH mozilla/security/jss
114
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -A -r NSS_3_11_1_RTM mozilla/security/nss/lib/freebl/ecl/ecl-curve.h
120
mkdir -p "${CVS_DIR}"
123
${CVS_CHECKOUT_BRANCH}
128
cd "${CVS_DIR}/mozilla/security/nss"
134
cd "${CVS_DIR}/mozilla/security/nss/tests"
141
mkdir -p "${TCOV_DIR}"
143
cat "${SUN_PROFDATA_DIR}/${SUN_PROFDATA}/tcovd" | grep SRCFILE | grep "${CVS_DIR}/.*.c$" | sed "s:[^/]*\(.*\):\1:" | sort -u |
146
DIR=`echo "${line}" | sed "s:${CVS_DIR}/\(.*\)/.*:\1:"`
147
FILE=`echo "${line}" | sed "s:.*/\(.*\):\1:"`
149
mkdir -p "${TCOV_DIR}/${DIR}"
150
tcov -o "${TCOV_DIR}/${DIR}/$FILE" -x "${SUN_PROFDATA}" $line >/dev/null 2>&1
160
./report.sh "${BRANCH}" "${DATE}" "${ARCH}"