init.sh
上传用户:lyxiangda
上传日期:2007-01-12
资源大小:3042k
文件大小:2k
源码类别:

CA认证

开发平台:

WINDOWS

  1. #! /bin/sh
  2. #
  3. #  Initialize a bunch of variables that may tests would be interested in
  4. #
  5. #
  6. mozilla_root=`(cd ../../../..; pwd)`
  7. common=`(cd ../common; pwd)`
  8. MOZILLA_ROOT=${MOZILLA_ROOT-$mozilla_root}
  9. COMMON=${TEST_COMMON-$common}
  10. DIST=${DIST-${MOZILLA_ROOT}/dist}
  11. SECURITY_ROOT=${SECURITY_ROOT-${MOZILLA_ROOT}/security/nss}
  12. TESTDIR=${TESTDIR-${MOZILLA_ROOT}/tests_results/security}
  13. OBJDIR=`cd ../common; gmake objdir_name` 
  14. OS_ARCH=`cd ../common; gmake os_arch`
  15. if [ ${OS_ARCH} = "WINNT" ]; then
  16. PATH=${DIST}/${OBJDIR}/bin;${DIST}/${OBJDIR}/lib;$PATH
  17. else
  18. PATH=${DIST}/${OBJDIR}/bin:${DIST}/${OBJDIR}/lib:$PATH
  19. fi
  20. export PATH
  21. LD_LIBRARY_PATH=${DIST}/${OBJDIR}/lib
  22. SHLIB_PATH=${DIST}/${OBJDIR}/lib
  23. LIBPATH=${DIST}/${OBJDIR}/lib
  24. export LD_LIBRARY_PATH SHLIB_PATH LIBPATH
  25. echo "LD_LIBRARY_PATH SHLIB_PATH LIBPATH=$LD_LIBRARY_PATH"
  26. echo "Creating ${TESTDIR}"
  27. if [ ! -d ${TESTDIR} ]; then
  28.    mkdir -p ${TESTDIR}
  29. fi
  30. if [ -z "${HOST}" ]; then 
  31.   echo "HOST environment variable is not defined."; exit 1
  32. fi
  33. if [ -z "${DOMSUF}" ]; then 
  34.   echo "DOMSUF environment variable is not defined."; exit 1
  35. fi
  36. if [ ! -s "${HOSTDIR}" ]; then
  37.     version=1
  38.     if [ -f ${TESTDIR}/${HOST} ]; then
  39. version=`cat ${TESTDIR}/${HOST}`
  40.     fi
  41.     expr $version + 1 > ${TESTDIR}/${HOST}
  42.     HOSTDIR=${TESTDIR}/${HOST}'.'$version
  43. fi
  44. if [ ! -d ${HOSTDIR} ]; then
  45.    mkdir -p ${HOSTDIR}
  46. fi
  47. RESULTS=${HOSTDIR}/results.html
  48. if [ ! -f "${RESULTS}" ]; then
  49. cp ${COMMON}/results_header.html ${RESULTS}
  50. echo "<H4>Platform: ${OBJDIR}<BR>" >> ${RESULTS}
  51. echo "Test Run: ${HOST}.$version</H4>" >> ${RESULTS}
  52. echo "<HR><BR>" >> ${RESULTS}
  53. echo "********************************************"
  54. echo "   Platform: ${OBJDIR}"
  55. echo "   Results: ${HOST}.$version"
  56. echo "********************************************"
  57. fi
  58. KILL="kill"
  59. if  [ ${OS_ARCH} = "Linux" ]; then
  60.         SLEEP="sleep 30"
  61. fi
  62. export  KILL