test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh

Print this page




  25 # @test
  26 # @bug     4858522
  27 # @summary 
  28 # @author  Steve Bohne
  29 #
  30 # @run shell GetOpenFileDescriptorCount.sh
  31 #
  32 
  33 if [ "${TESTJAVA}" = "" ] ; then
  34      echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test."
  35      exit 1
  36 fi
  37 if [ "${COMPILEJAVA}" = "" ]; then
  38     COMPILEJAVA="${TESTJAVA}"
  39 fi
  40 runOne()
  41 { 
  42    echo "runOne $@"
  43    $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d $TESTCLASSES \
  44        $TESTSRC/$@.java || exit 2
  45    $TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES $@        || exit 3
  46 }
  47 
  48 # Test GetOpenFileDescriptorCount if we are running on Unix
  49 case `uname -s` in
  50     SunOS | Linux )
  51        runOne GetOpenFileDescriptorCount
  52        ;;
  53     * )
  54        echo "Ignore test when not run on Solaris or Linux"
  55        exit 0
  56        ;;
  57 esac
  58 
  59 exit 0


  25 # @test
  26 # @bug     4858522
  27 # @summary 
  28 # @author  Steve Bohne
  29 #
  30 # @run shell GetOpenFileDescriptorCount.sh
  31 #
  32 
  33 if [ "${TESTJAVA}" = "" ] ; then
  34      echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test."
  35      exit 1
  36 fi
  37 if [ "${COMPILEJAVA}" = "" ]; then
  38     COMPILEJAVA="${TESTJAVA}"
  39 fi
  40 runOne()
  41 { 
  42    echo "runOne $@"
  43    $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d $TESTCLASSES \
  44        $TESTSRC/$@.java || exit 2
  45    $TESTJAVA/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} -classpath $TESTCLASSES $@        || exit 3
  46 }
  47 
  48 # Test GetOpenFileDescriptorCount if we are running on Unix
  49 case `uname -s` in
  50     SunOS | Linux )
  51        runOne GetOpenFileDescriptorCount
  52        ;;
  53     * )
  54        echo "Ignore test when not run on Solaris or Linux"
  55        exit 0
  56        ;;
  57 esac
  58 
  59 exit 0