test/sun/jvmstat/testlibrary/utils.sh

Print this page




  23 
  24 #
  25 
  26 setup() {
  27     # Verify directory context variables are set
  28     if [ "${TESTJAVA}" = "" ] ; then
  29         echo "TESTJAVA not set. Test cannot execute.  Failed."
  30         exit 1
  31     fi
  32 
  33     if [ "${TESTCLASSES}" = "" ] ; then
  34         TESTCLASSES="."
  35     fi
  36 
  37     if [ "${TESTSRC}" = "" ] ; then
  38         TESTSRC="."
  39     fi
  40 
  41     OS=`uname -s`
  42     case ${OS} in
  43     Windows_*)
  44         PS=";"
  45         FS="\\"
  46         ;;
  47     *)
  48         PS=":"
  49         FS="/"
  50         ;;
  51     esac
  52 }
  53 
  54 verify_os() {
  55     OS=`uname -s`
  56     case ${OS} in
  57     Windows_95 | Windows_98 | Windows_ME)
  58         echo "Test bypassed: jvmstat feature not supported on ${OS}"
  59         exit 0
  60         ;;
  61     Windows_*)
  62         # verify that the tmp directory supports persistent ACLs, which
  63         # are required for jvmstat to enable its shared memory feature.
  64         # NOTE: FAT type files systems do not support ACLs, but NTFS files
  65         # systems do.
  66         #
  67         echo "temp directory is in: `windir -t`"
  68         TMPDRIVE=`windir -t | cut -d: -f1`
  69         if [ "${TMPDRIVE}" = "" ] ; then
  70             echo "Could not get temp directory drive letter"
  71             exit 1
  72         fi
  73 
  74         echo "temp file system characteristics:"
  75         sysinf drives -a | grep "^${TMPDRIVE}"
  76         sysinf drives -a | grep "^${TMPDRIVE}" | grep PERSISTENT_ACLS > /dev/null
  77         case $? in
  78         0)
  79             ;;
  80         1)
  81             echo "Test bypassed: jvmstat feature disabled because the temp"




  23 
  24 #
  25 
  26 setup() {
  27     # Verify directory context variables are set
  28     if [ "${TESTJAVA}" = "" ] ; then
  29         echo "TESTJAVA not set. Test cannot execute.  Failed."
  30         exit 1
  31     fi
  32 
  33     if [ "${TESTCLASSES}" = "" ] ; then
  34         TESTCLASSES="."
  35     fi
  36 
  37     if [ "${TESTSRC}" = "" ] ; then
  38         TESTSRC="."
  39     fi
  40 
  41     OS=`uname -s`
  42     case ${OS} in
  43     Windows_* | CYGWIN*)
  44         PS=";"
  45         FS="\\"
  46         ;;
  47     *)
  48         PS=":"
  49         FS="/"
  50         ;;
  51     esac
  52 }
  53 
  54 verify_os() {
  55     OS=`uname -s`
  56     case ${OS} in
  57     Windows_95 | Windows_98 | Windows_ME)
  58         echo "Test bypassed: jvmstat feature not supported on ${OS}"
  59         exit 0
  60         ;;
  61     Windows_* | CYGWIN*)
  62         # verify that the tmp directory supports persistent ACLs, which
  63         # are required for jvmstat to enable its shared memory feature.
  64         # NOTE: FAT type files systems do not support ACLs, but NTFS files
  65         # systems do.
  66         #
  67         echo "temp directory is in: `windir -t`"
  68         TMPDRIVE=`windir -t | cut -d: -f1`
  69         if [ "${TMPDRIVE}" = "" ] ; then
  70             echo "Could not get temp directory drive letter"
  71             exit 1
  72         fi
  73 
  74         echo "temp file system characteristics:"
  75         sysinf drives -a | grep "^${TMPDRIVE}"
  76         sysinf drives -a | grep "^${TMPDRIVE}" | grep PERSISTENT_ACLS > /dev/null
  77         case $? in
  78         0)
  79             ;;
  80         1)
  81             echo "Test bypassed: jvmstat feature disabled because the temp"