зеркало из https://github.com/mozilla/pjs.git
additions for JSS sanity check
This commit is contained in:
Родитель
6a68d944fe
Коммит
a682d5e5ac
|
@ -564,10 +564,17 @@ init_dirs()
|
|||
RESULTDIR=${UX_MASTERDIR}/mozilla/tests_results/security
|
||||
fi
|
||||
|
||||
TESTSCRIPTDIR=${MOZILLA_ROOT}/security/nss/tests
|
||||
if [ -n "$PRODUCT_TO_TEST" -a "$PRODUCT_TO_TEST" = "JSS" ] ; then
|
||||
|
||||
if [ ! -d $TESTSCRIPTDIR ]
|
||||
then
|
||||
if [ "$O_WIN" = "ON" ] ; then
|
||||
JSS_NSS_SRC_DIR=$JSS_NSS_NT_SRC_DIR
|
||||
fi
|
||||
TESTSCRIPTDIR=${NSS_VER_DIR}/../${JSS_NSS_SRC_DIR}/mozilla/security/nss/tests
|
||||
else
|
||||
TESTSCRIPTDIR=${MOZILLA_ROOT}/security/nss/tests
|
||||
fi
|
||||
|
||||
if [ ! -d $TESTSCRIPTDIR ] ; then
|
||||
if [ "$O_WIN" = "ON" -a "$WIN_WAIT_FOREVER" = "ON" ]
|
||||
then
|
||||
WaitForever $TESTSCRIPTDIR/all.sh 1
|
||||
|
@ -1072,6 +1079,12 @@ set_objdir()
|
|||
########################################################################
|
||||
bc()
|
||||
{
|
||||
if [ -n "$PRODUCT_TO_TEST" -a "$PRODUCT_TO_TEST" = "JSS" ] ; then
|
||||
TESTDIR=${RESULTDIR}
|
||||
BC_ACTION=""
|
||||
DON_T_SET_PATHS="FALSE" #let init.sh override - FIXME - check if necessary
|
||||
return
|
||||
fi
|
||||
DON_T_SET_PATHS="TRUE"
|
||||
case $1 in
|
||||
0)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
if ( "$2" == "" ) then
|
||||
setenv BUILDDATE `date +%m%d`
|
||||
else
|
||||
setenv BUILDDATE $2
|
||||
endif
|
||||
|
||||
if ( "$1" == "" ) then
|
||||
setenv JSSVER tip
|
||||
else
|
||||
setenv JSSVER $1
|
||||
endif
|
||||
|
||||
if ( ! ${?QAYEAR} ) then
|
||||
setenv QAYEAR `date +%Y`
|
||||
else if ( "$QAYEAR" == "" ) then
|
||||
setenv QAYEAR `date +%Y`
|
||||
|
||||
endif
|
||||
|
||||
setenv JSS_VER_DIR /share/builds/mccrel/jss/jss$JSSVER
|
||||
setenv NTDIST ${JSS_VER_DIR}/builds/${QAYEAR}${BUILDDATE}.1/blowfish_NT4.0_Win95/mozilla/dist
|
||||
setenv UXDIST ${JSS_VER_DIR}/builds/${QAYEAR}${BUILDDATE}.1/booboo_Solaris8/mozilla/dist
|
||||
setenv TESTSCRIPTDIR ${JSS_VER_DIR}/builds/${QAYEAR}${BUILDDATE}.1/booboo_Solaris8/mozilla/security/jss/tests
|
||||
setenv RESULTDIR ${JSS_VER_DIR}/builds/${QAYEAR}${BUILDDATE}.1/booboo_Solaris8/mozilla/tests_results/security
|
||||
|
||||
cd ${JSS_VER_DIR}/builds/${QAYEAR}${BUILDDATE}.1/booboo_Solaris8
|
||||
pwd
|
||||
ls
|
|
@ -0,0 +1,220 @@
|
|||
#! /bin/sh
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# /u/sonmi/bin/jssqa
|
||||
#
|
||||
# this script is supposed to automatically run - now a sanity test, later QA for
|
||||
# JSS on all required Unix and Windows (NT and 2000) platforms
|
||||
#
|
||||
# parameters
|
||||
# ----------
|
||||
# jssversion (supported: 31, tip)
|
||||
# builddate (default - today)
|
||||
#
|
||||
# options
|
||||
# -------
|
||||
# -y answer all questions with y - use at your own risk...ignores warnings
|
||||
# -s silent (only usefull with -y)
|
||||
# -h, -? - you guessed right - displays this text
|
||||
# -d debug
|
||||
# -f <filename> - write the (error)output to filename
|
||||
# -cron equivalient to -y -s -d -f $RESULTDIR/$HOST.nssqa
|
||||
#
|
||||
########################################################################
|
||||
|
||||
O_OPTIONS=ON # accept options (see above for listing)
|
||||
WIN_WAIT_FOREVER=OFF # don't wait for the NSS testdir
|
||||
PRODUCT_TO_TEST="JSS"
|
||||
JSS_NSPR_DIR="/share/builds/components/nspr20/v4.1.2"
|
||||
JSS_NSS_DIR="/share/builds/components/nss/NSS_3_3_1_RTM"
|
||||
JSS_NSS_UX_SRC_DIR="nss331/builds/20010928.2.331-RTM/booboo_Solaris8"
|
||||
JSS_NSS_NT_SRC_DIR="nss331/builds/20010928.2.331-RTM/blowfish_NT4.0_Win95"
|
||||
JSS_NSS_SRC_DIR=$JSS_NSS_UX_SRC_DIR
|
||||
NATIVE_FLAG=""
|
||||
|
||||
. `dirname $0`/header # utilities, shellfunctions etc, global to NSS and JSS QA
|
||||
|
||||
if [ -z "$O_TBX" -o "$O_TBX" != "ON" ] ; then
|
||||
is_running ${TMP}/jssqa
|
||||
# checks if the file exists, if yes Exits, if not
|
||||
# creates to implement a primitive locking mechanism
|
||||
fi
|
||||
|
||||
INTERNAL_TOKEN="NSS Certificate DB"
|
||||
#INTERNAL_TOKEN="Internal Key Storage Token"
|
||||
|
||||
################################ jss_init #########################
|
||||
#
|
||||
# Most of the procedure is setting up the test environment.
|
||||
# set all necessary dir and file variables, set all paths, copy the shared libs
|
||||
# Put all the shared libraries into a lib directory, <libdir>.
|
||||
# including the libjss3.so that was built by the build process.
|
||||
# set LD_LIBRARY PATH and CLASSPATH
|
||||
# The xpclass.jar produced by the JSS build needs to be in the classpath.
|
||||
# The classpath must also include the current directory so we can run our test
|
||||
# programs.
|
||||
################################################################################
|
||||
|
||||
jss_init()
|
||||
{
|
||||
Debug "Jss init"
|
||||
#correct all directories that the header has set...
|
||||
NTDIST=`echo $NTDIST | sed -e 's/nss/jss/g'`
|
||||
UXDIST=`echo $UXDIST | sed -e 's/nss/jss/g'`
|
||||
RESULTDIR=`echo $RESULTDIR | sed -e 's/nss/jss/g'`
|
||||
JSS_LOGFILE=${RESULTDIR}/${HOST}.txt
|
||||
FILENAME=$JSS_LOGFILE
|
||||
O_FILE=ON
|
||||
|
||||
MOZILLA_ROOT=`echo $MOZILLA_ROOT | sed -e 's/nss/jss/g'`
|
||||
|
||||
JSS_SAMPLES="$MOZILLA_ROOT/security/jss/samples"
|
||||
JSS_CLASSPATH=`echo $MOZILLA_ROOT |
|
||||
sed -e "s/jss$NSSVER.builds/jss$NSSVER\/ships/g" -e "s/mozilla/jss\/${QAYEAR}${BUILDDATE}/"`
|
||||
Debug "JSS_CLASSPATH=$JSS_CLASSPATH"
|
||||
Debug "JSS_SAMPLES=$JSS_SAMPLES"
|
||||
|
||||
if [ ! -d $JSS_SAMPLES ] ; then
|
||||
if [ "$O_WIN" = "ON" -a "$WIN_WAIT_FOREVER" = "ON" ]
|
||||
then
|
||||
WaitForever $JSS_SAMPLES/TestKeyGen.java 1
|
||||
else
|
||||
Exit "Test directory $JSS_SAMPLES does not exist"
|
||||
fi
|
||||
fi
|
||||
|
||||
PWFILE="$JSS_SAMPLES/passwd"
|
||||
EMPTYFILE="$JSS_SAMPLES/emptyfile"
|
||||
rm $PWFILE $EMPTYFILE 2>/dev/null
|
||||
echo "jss" >$PWFILE
|
||||
echo "" >$EMPTYFILE
|
||||
echo "" >>$EMPTYFILE
|
||||
echo "" >>$EMPTYFILE
|
||||
|
||||
INIT_PATH=$PATH
|
||||
INIT_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
}
|
||||
|
||||
|
||||
jss_mode_init()
|
||||
{
|
||||
OBJDIR=`cd ${TESTSCRIPTDIR}/common; gmake objdir_name`
|
||||
|
||||
LOCALDIST_BIN=`echo $LOCALDIST_BIN | sed -e 's/nss/jss/g'`
|
||||
LOCALDIST_LIB=$LOCALDIST_BIN/../lib
|
||||
debug_dirs
|
||||
|
||||
#make testdir/libdir
|
||||
|
||||
JSS_LIBDIR=${RESULTDIR}/${HOST}.libdir/${OBJDIR}
|
||||
mkdir -p ${JSS_LIBDIR} 2>/dev/null
|
||||
Debug "JSS_LIBDIR=$JSS_LIBDIR"
|
||||
|
||||
#Put all the shared libraries into a lib directory
|
||||
Debug "copy all needed libs to ${JSS_LIBDIR}"
|
||||
cp $JSS_NSPR_DIR/${OBJDIR}/lib/* ${JSS_LIBDIR}
|
||||
cp $JSS_NSS_DIR/${OBJDIR}/lib/* ${JSS_LIBDIR}
|
||||
cp $LOCALDIST_LIB/libjss3.* ${JSS_LIBDIR}
|
||||
#FIXME uncomment above
|
||||
|
||||
if [ $O_DEBUG = ON ] ; then
|
||||
Debug "ls $JSS_LIBDIR"
|
||||
ls $JSS_LIBDIR
|
||||
fi
|
||||
|
||||
LD_LIBRARY_PATH=$INIT_LD_LIBRARY_PATH:${JSS_LIBDIR}
|
||||
CLASSPATH="$JSS_CLASSPATH/xpclass.jar:."
|
||||
|
||||
SHLIB_PATH=${LD_LIBRARY_PATH}
|
||||
LIBPATH=${LD_LIBRARY_PATH}
|
||||
|
||||
PATH=$JSS_NSPR_DIR/${OBJDIR}/bin:$JSS_NSS_DIR/${OBJDIR}//bin:$INIT_PATH
|
||||
Debug "PATH $PATH"
|
||||
Debug "LD_LIBRARY_PATH $LD_LIBRARY_PATH"
|
||||
Debug "CLASSPATH=$CLASSPATH"
|
||||
|
||||
export CLASSPATH LD_LIBRARY_PATH SHLIB_PATH LIBPATH
|
||||
export TESTSCRIPTDIR COMMON
|
||||
export_dirs
|
||||
}
|
||||
|
||||
|
||||
################################ jss_test #########################
|
||||
#
|
||||
# go into the build tree. cd to mozilla/security/jss/samples.
|
||||
# Create NSS directories in this directory with modutil and set the password
|
||||
#
|
||||
#6. Create an alias for the "java" and "javac" commands. You'll need to set
|
||||
#it to whatever version of the JDK you used to build on this platform. For
|
||||
#example,
|
||||
#alias java /share/builds/components/cms_jdk/AIX/1.3.0/jre/bin/java
|
||||
#alias javac /share/builds/components/cms_jdk/AIX/1.3.0/bin/javac
|
||||
# instead $JAVA and $JAVAC
|
||||
# 7. Compile the tests.
|
||||
#####################################################################
|
||||
jss_test()
|
||||
{
|
||||
O_FILE=OFF
|
||||
Debug "JSS main test"
|
||||
#set -x
|
||||
cd $JSS_SAMPLES
|
||||
|
||||
Debug "Cleaning $JSS_SAMPLES"
|
||||
rm cert7.db key3.db 2>/dev/null
|
||||
|
||||
Debug "modutil -dbdir . -create"
|
||||
echo | modutil -dbdir . -create
|
||||
Debug "modutil returned $?"
|
||||
|
||||
modutil -dbdir . -list
|
||||
|
||||
Debug "echo | modutil -dbdir . -changepw \"$INTERNAL_TOKEN\" -newpwfile $PWFILE "
|
||||
modutil -dbdir . -changepw "$INTERNAL_TOKEN" -newpwfile $PWFILE <$EMPTYFILE
|
||||
#modutil -dbdir . -changepw "$INTERNAL_TOKEN" -pwfile $PWFILE -newpwfile $PWFILE <$EMPTYFILE
|
||||
Debug "modutil returned $?"
|
||||
|
||||
Debug "$JAVAC TestKeyGen.java"
|
||||
$JAVAC TestKeyGen.java
|
||||
Debug "$JAVAC TestKeyGen.java returned $?"
|
||||
|
||||
Debug "$JAVAC SigTest.java"
|
||||
$JAVAC SigTest.java
|
||||
Debug "$JAVAC SigTest.java returned $?"
|
||||
|
||||
echo "Starting new jss test on $HOST"
|
||||
date
|
||||
#script <platform>.txt
|
||||
#
|
||||
#9. Run the tests
|
||||
|
||||
Debug "$JAVA $NATIVE_FLAG TestKeyGen ."
|
||||
$JAVA $NATIVE_FLAG TestKeyGen .
|
||||
#$JAVA $NATIVE_FLAG TestKeyGen . >>$JSS_LOGFILE 2>&1
|
||||
Debug "$JAVA TestKeyGen returned $?"
|
||||
|
||||
Debug "$JAVA $NATIVE_FLAG SigTest . \"$INTERNAL_TOKEN\""
|
||||
$JAVA $NATIVE_FLAG SigTest . "$INTERNAL_TOKEN"
|
||||
#$JAVA $NATIVE_FLAG SigTest . "$INTERNAL_TOKEN" >>$JSS_LOGFILE 2>&1
|
||||
Debug "$JAVA SigTest returned $?"
|
||||
#java TestKeyGen [... test will run interactively ...]
|
||||
#javac SigTest [... test will run interactively ...]
|
||||
#
|
||||
#10. Stop the logging.
|
||||
#exit
|
||||
O_FILE=ON
|
||||
}
|
||||
|
||||
jss_init
|
||||
jss_mode_init
|
||||
if [ -z "O_CRON" -o "$O_CRON" != "ON" ]
|
||||
then
|
||||
tail -f ${JSS_LOGFILE} &
|
||||
TAILPID=$!
|
||||
fi
|
||||
|
||||
jss_test >>$JSS_LOGFILE 2>&1
|
||||
BUILD_OPT=1; export BUILD_OPT; Debug "BUILD_OPT $BUILD_OPT"
|
||||
jss_mode_init
|
||||
jss_test >>$JSS_LOGFILE 2>&1
|
||||
Exit "jssqa completed. Done `uname -n` $QA_OS_STRING"
|
|
@ -32,6 +32,7 @@ if [ "$os_name" != "Windows_95" -a \
|
|||
"$os_name" != "CYGWIN_98-4.10" ]
|
||||
then
|
||||
PATH=.:$HOME/bin:/tools/ns/bin:/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/dist/local/exe:/usr/bin/X11:/usr/audio/bin:/u/sonmi/bin:$PATH
|
||||
JAVA_HOME="D:/i386/jdk1.2.2"
|
||||
fi
|
||||
|
||||
CVSROOT=:pserver:svbld@redcvs.red.iplanet.com:/m/src
|
||||
|
@ -57,8 +58,10 @@ export CVSROOT HOME os_name os_version os_full MANPATH
|
|||
if [ "$os_name" = "HP-UX" ]
|
||||
then
|
||||
PATH=$PATH:/usr/local/bin:/opt/aCC/bin:/usr/local/bin/audio:/tools/ns/bin:/etc:/usr/contrib/bin:/usr/contrib/bin/X11:/usr/local/hpux/bin:/nfs/iapp1/hphome/bin:/etc:/u/svbld/bin/HP/perl/bin
|
||||
JAVA_HOME="/share/builds/components/cms_jdk/HP-UX/1.2.2.04"
|
||||
elif [ "$os_name" = "SunOS" ]
|
||||
then
|
||||
NATIVE_FLAG="-native"
|
||||
XAPPLRESDIR=/usr/openwin/lib/app-defaults:/usr/local/lib/X11/app-defaults
|
||||
OPENWINHOME=/usr/openwin
|
||||
LD_LIBRARY_PATH=$OPENWINHOME/lib
|
||||
|
@ -78,14 +81,18 @@ then
|
|||
PATH=/usr/ucb:$PATH
|
||||
fi
|
||||
export XAPPLRESDIR OPENWINHOME LD_LIBRARY_PATH
|
||||
JAVA_HOME="/share/builds/components/jdk/1.2.2/SunOS"
|
||||
|
||||
elif [ "$os_name" = "IRIX" ]
|
||||
then
|
||||
PATH=$PATH:/tools/ns/bin:/usr/local/bin:/etc:/usr/bsd
|
||||
MANPATH=/tools/ns/man:/usr/local/man
|
||||
JAVA_HOME="/share/builds/components/jdk/1.2.2/IRIX"
|
||||
elif [ "$os_name" = "IRIX64" ]
|
||||
then
|
||||
PATH=$PATH:/tools/ns/bin:/usr/local/bin:/etc:/usr/bsd
|
||||
MANPATH=/tools/ns/man:/usr/local/man
|
||||
JAVA_HOME="/share/builds/components/jdk/1.2.2/IRIX"
|
||||
elif [ "$os_name" = "Linux" ]
|
||||
then
|
||||
PATH=/lib:/usr/lib:/bin:/sbin:/usr/bin:/usr/sbin:$PATH
|
||||
|
@ -94,33 +101,19 @@ then
|
|||
#the errormessage
|
||||
BEFORE_CONTEXT_GREP="--before-context=10"
|
||||
AFTER_CONTEXT_GREP="--after-context=3"
|
||||
|
||||
JAVA_HOME="/share/builds/components/jdk/1.2.2/Linux"
|
||||
elif [ "$os_name" = "AIX" ]
|
||||
then
|
||||
PATH=$PATH:/tools/contrib/bin:/usr/local/bin
|
||||
TERM=vt100
|
||||
export TERM
|
||||
JAVA_HOME="/share/builds/components/cms_jdk/AIX/1.3.0"
|
||||
elif [ "$os_name" = "OSF1" ]
|
||||
then
|
||||
PATH=$PATH:/usr/local/bin
|
||||
JAVA_HOME="/share/builds/components/jdk/1.2.2/OSF1"
|
||||
fi
|
||||
|
||||
#if [ "$os_full" = "HPUX 11.00" ]
|
||||
#then
|
||||
#PATH=$PATH
|
||||
#elif [ "$os_full" = "HPUX 10.10" ]
|
||||
#then
|
||||
#PATH=$PATH
|
||||
#elif [ "$os_full" = "AIX 4.1.4.0" ]
|
||||
#then
|
||||
#PATH=$PATH
|
||||
#elif [ "$os_full" = "AIX 4.1.5.0" ]
|
||||
#then
|
||||
#PATH=$PATH
|
||||
#elif [ "$os_full" = "AIX 4.2.1.0" ]
|
||||
#then
|
||||
#PATH=$PATH
|
||||
#elif [ "$os_name" = "IRIX" ]
|
||||
if [ "$os_name" = "IRIX" ]
|
||||
then
|
||||
PATH=/tools/ns-arch/soft/perl-5.004_04/run/default/mips_sgi_irix5.3/bin:$PATH
|
||||
|
@ -218,3 +211,7 @@ umask 022
|
|||
|
||||
system=`uname -n` # name of this system.
|
||||
|
||||
JAVAC=$JAVA_HOME/bin/javac
|
||||
JAVA=$JAVA_HOME/bin/java
|
||||
export JAVAC JAVA JAVA_HOME
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче