test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh

Print this page




  21 # have any questions.
  22 #
  23 
  24 # @test
  25 # @summary Unit test for java.nio.channels.spi.AsynchronousChannelProvider
  26 # @build Provider1 Provider2 CheckProvider
  27 # @run shell custom_provider.sh
  28 
  29 # if TESTJAVA isn't set then we assume an interactive run.
  30 
  31 if [ -z "$TESTJAVA" ]; then
  32     TESTSRC=.
  33     TESTCLASSES=.
  34     JAVA=java
  35 else
  36     JAVA="${TESTJAVA}/bin/java"
  37 fi
  38 
  39 OS=`uname -s`
  40 case "$OS" in
  41     Windows_* )
  42         CLASSPATH="${TESTCLASSES};${TESTSRC}"
  43         ;;
  44     * )
  45         CLASSPATH=${TESTCLASSES}:${TESTSRC}
  46         ;;
  47 esac
  48 export CLASSPATH
  49 
  50 failures=0
  51 
  52 go() {
  53     echo ''
  54     $JAVA $1 $2 $3 2>&1
  55     if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
  56 }
  57 
  58 # Run the tests
  59 
  60 go CheckProvider Provider1
  61 go -Djava.nio.channels.spi.AsynchronousChannelProvider=Provider2 CheckProvider \


  21 # have any questions.
  22 #
  23 
  24 # @test
  25 # @summary Unit test for java.nio.channels.spi.AsynchronousChannelProvider
  26 # @build Provider1 Provider2 CheckProvider
  27 # @run shell custom_provider.sh
  28 
  29 # if TESTJAVA isn't set then we assume an interactive run.
  30 
  31 if [ -z "$TESTJAVA" ]; then
  32     TESTSRC=.
  33     TESTCLASSES=.
  34     JAVA=java
  35 else
  36     JAVA="${TESTJAVA}/bin/java"
  37 fi
  38 
  39 OS=`uname -s`
  40 case "$OS" in
  41     Windows_* | CYGWIN* )
  42         CLASSPATH="${TESTCLASSES};${TESTSRC}"
  43         ;;
  44     * )
  45         CLASSPATH=${TESTCLASSES}:${TESTSRC}
  46         ;;
  47 esac
  48 export CLASSPATH
  49 
  50 failures=0
  51 
  52 go() {
  53     echo ''
  54     $JAVA $1 $2 $3 2>&1
  55     if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
  56 }
  57 
  58 # Run the tests
  59 
  60 go CheckProvider Provider1
  61 go -Djava.nio.channels.spi.AsynchronousChannelProvider=Provider2 CheckProvider \