Fix for bug 401792 . Restore support for cygwin in all.sh . r=slavo, alexei:wq

git-svn-id: svn://10.0.0.236/trunk@239393 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
julien.pierre.boogz%sun.com 2007-11-14 22:40:23 +00:00
parent df17754a6e
commit 774edd4762
5 changed files with 49 additions and 5 deletions

View File

@ -97,6 +97,11 @@ cert_init()
html_passed "<TR><TD>Looking for root certs module."
fi
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
ROOTCERTSFILE=`cygpath -m ${ROOTCERTSFILE}`
fi
################## Generate noise for our CA cert. ######################
# NOTE: these keys are only suitable for testing, as this whole thing
# bypasses the entropy gathering. Don't use this method to generate
@ -220,6 +225,9 @@ cert_init_cert()
CERTDIR="."
PROFILEDIR=`cd ${CERTDIR}; pwd`
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
PROFILEDIR=`cygpath -m ${PROFILEDIR}`
fi
if [ -n "${MULTIACCESS_DBM}" ]; then
PROFILEDIR="multiaccess:${DOMAIN}"
fi
@ -490,6 +498,9 @@ cert_CA()
pwd
LPROFILE=`pwd`
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
LPROFILE=`cygpath -m ${LPROFILE}`
fi
if [ -n "${MULTIACCESS_DBM}" ]; then
LPROFILE="multiaccess:${DOMAIN}"
fi
@ -952,6 +963,9 @@ cert_stresscerts()
cd "${CERTDIR}"
PROFILEDIR=`cd ${CERTDIR}; pwd`
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
PROFILEDIR=`cygpath -m ${PROFILEDIR}`
fi
if [ -n "${MULTIACCESS_DBM}" ]; then
PROFILEDIR="multiaccess:${D_CLIENT}"
fi
@ -1170,6 +1184,9 @@ cert_crl_ssl()
cd $CADIR
PROFILEDIR=`cd ${CLIENTDIR}; pwd`
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
PROFILEDIR=`cygpath -m ${PROFILEDIR}`
fi
CRL_GRPS_END=`expr ${CRL_GRP_1_BEGIN} + ${TOTAL_CRL_RANGE} - 1`
echo "$SCRIPTNAME: Creating Client CA Issued Certificates Range $CRL_GRP_1_BEGIN - $CRL_GRPS_END ==="
CU_ACTION="Creating client test certs"

View File

@ -5,6 +5,9 @@
#
. ../common/init.sh
CURDIR=`pwd`
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
CURDIR=`cygpath -m ${CURDIR}`
fi
CIPHERDIR=${HOSTDIR}/cipher
SKTESTS=${CURDIR}/symmkey.txt

View File

@ -257,14 +257,23 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
COMMON=${TEST_COMMON-$common}
export COMMON
MAKE=`which gmake`
if [ -z "$MAKE" ]; then
MAKE=`which make`
fi
if [ -z "$MAKE" ]; then
You are missing make.
exit 5
fi
DIST=${DIST-${MOZILLA_ROOT}/dist}
SECURITY_ROOT=${SECURITY_ROOT-${MOZILLA_ROOT}/security/nss}
TESTDIR=${TESTDIR-${MOZILLA_ROOT}/tests_results/security}
OBJDIR=`(cd $COMMON; gmake objdir_name)`
OS_ARCH=`(cd $COMMON; gmake os_arch)`
DLL_PREFIX=`(cd $COMMON; gmake dll_prefix)`
DLL_SUFFIX=`(cd $COMMON; gmake dll_suffix)`
OS_NAME=`uname -s | sed -e "s/-[0-9]*\.[0-9]*//"`
OBJDIR=`(cd $COMMON; $MAKE objdir_name)`
OS_ARCH=`(cd $COMMON; $MAKE os_arch)`
DLL_PREFIX=`(cd $COMMON; $MAKE dll_prefix)`
DLL_SUFFIX=`(cd $COMMON; $MAKE dll_suffix)`
OS_NAME=`uname -s | sed -e "s/-[0-9]*\.[0-9]*//" | sed -e "s/-WOW64//"`
# Pathnames constructed from ${TESTDIR} are passed to NSS tools
# such as certutil, which don't understand Cygwin pathnames.
@ -272,6 +281,14 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
# regular slashes).
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
TESTDIR=`cygpath -m ${TESTDIR}`
QADIR=`cygpath -m ${QADIR}`
fi
# Same problem with MSYS/Mingw, except we need to start over with pwd -W
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "MINGW32_NT" ]; then
mingw_mozilla_root=`(cd ../../../..; pwd -W)`
MINGW_MOZILLA_ROOT=${MINGW_MOZILLA_ROOT-$mingw_mozilla_root}
TESTDIR=${MINGW_TESTDIR-${MINGW_MOZILLA_ROOT}/tests_results/security}
fi
# Same problem with MSYS/Mingw, except we need to start over with pwd -W

View File

@ -269,6 +269,10 @@ fips_140()
if [ $? -eq 0 ]; then
if [ "${OS_ARCH}" = "WINNT" ]; then
DBTEST=`which dbtest`
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
DBTEST=`cygpath -m ${DBTEST}`
MANGLEDIR=`cygpath -u ${MANGLEDIR}`
fi
echo "PATH=${MANGLEDIR} ${DBTEST} -r -d ${P_R_FIPSDIR}"
PATH="${MANGLEDIR}" ${DBTEST} -r -d ${P_R_FIPSDIR} > ${TMP}/dbtestoutput.txt 2>&1
RESULT=$?

View File

@ -80,6 +80,9 @@ createDBDir() {
if [ -z "`ls $trgDir | grep db`" ]; then
trgDir=`cd ${trgDir}; pwd`
if [ "${OS_ARCH}" = "WINNT" -a "$OS_NAME" = "CYGWIN_NT" ]; then
trgDir=`cygpath -m ${trgDir}`
fi
CU_ACTION="Initializing DB at ${trgDir}"
certu -N -d "${trgDir}" -f "${R_PWFILE}" 2>&1