test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh

Print this page


   1 #!/bin/sh
   2 
   3 #
   4 # Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
   5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   6 #
   7 # This code is free software; you can redistribute it and/or modify it
   8 # under the terms of the GNU General Public License version 2 only, as
   9 # published by the Free Software Foundation.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 
  27 # @test
  28 # @bug 4673940
  29 # @bug 4930794
  30 # @summary Unit tests for inetd feature
  31 #
  32 # @build StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
  33 # @run shell run_tests.sh
  34 
  35 os=`uname -s`
  36 
  37 if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
  38     echo "Test not designed to run on this operating system, skipping..."
  39     exit 0
  40 fi
  41 
  42 
  43 # if TESTJAVA isn't set then we assume an interactive run. So that it's
  44 # clear which version of 'java' is running we do a 'which java' and
  45 # a 'java -version'.
  46 
  47 if [ -z "$TESTJAVA" ]; then
  48     TESTSRC=`pwd`
  49     TESTCLASSES=`pwd`
  50     JAVA=java
  51     which $JAVA
  52     ${JAVA} -d64 -version > /dev/null 2<&1
  53     if [ $? = 1 ]; then
  54         ${JAVA} -version
  55     else
  56         ${JAVA} -d64 -version
  57     fi
  58 else
  59     JAVA="${TESTJAVA}/bin/java"
  60 fi
  61 
  62 CLASSPATH=${TESTCLASSES}
  63 export CLASSPATH
  64 
  65 
  66 # Check that we have libLauncher.so for the right platform.
  67 # On Solaris we assume 64-bit if java -d64 works.
  68 
  69 DFLAG=
  70 if [ "$os" = "SunOS" ]; then
  71     PLATFORM=solaris
  72     case "`uname -p`" in
  73         i[3-9]86) 
  74             ARCH=i586
  75             ;;
  76         sparc)
  77             ARCH=sparc
  78             ${JAVA} -d64 -version > /dev/null 2<&1 
  79             if [ $? = 1 ]; then
  80                 ARCH=sparc
  81             else
  82                 ARCH=sparcv9
  83                 DFLAG=-d64
  84             fi
  85             ;;
  86     esac 
  87 fi
  88 
  89 if [ "$os" = "Linux" ]; then
  90     PLATFORM=linux
  91     ARCH=unknown
  92     case "`uname -m`" in
  93         i[3-6]86)
  94             ARCH=i586
  95             ;;
  96         ia64)
  97             ARCH=ia64
  98             ;;
  99         x86_64)
 100             ARCH=amd64
 101             ;;
 102     esac
 103 fi
 104 


   1 #!/bin/sh
   2 
   3 #
   4 # Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
   5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   6 #
   7 # This code is free software; you can redistribute it and/or modify it
   8 # under the terms of the GNU General Public License version 2 only, as
   9 # published by the Free Software Foundation.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 

  26 # @test
  27 # @bug 4673940
  28 # @bug 4930794
  29 # @summary Unit tests for inetd feature
  30 #
  31 # @build StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
  32 # @run shell run_tests.sh
  33 
  34 os=`uname -s`
  35 
  36 if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
  37     echo "Test not designed to run on this operating system, skipping..."
  38     exit 0
  39 fi
  40 

  41 # if TESTJAVA isn't set then we assume an interactive run. So that it's
  42 # clear which version of 'java' is running we do a 'which java' and
  43 # a 'java -version'.
  44 
  45 if [ -z "$TESTJAVA" ]; then
  46     TESTSRC=`pwd`
  47     TESTCLASSES=`pwd`
  48     JAVA=java
  49     which $JAVA
  50     ${JAVA} -d64 -version > /dev/null 2<&1
  51     if [ $? = 1 ]; then
  52         ${JAVA} -version
  53     else
  54         ${JAVA} -d64 -version
  55     fi
  56 else
  57     JAVA="${TESTJAVA}/bin/java"
  58 fi
  59 
  60 CLASSPATH=${TESTCLASSES}
  61 export CLASSPATH
  62 
  63 
  64 # Check that we have libLauncher.so for the right platform.
  65 # On Solaris we assume 64-bit
  66 
  67 DFLAG=
  68 if [ "$os" = "SunOS" ]; then
  69     PLATFORM=solaris
  70     case "`uname -p`" in
  71         i[3-9]86) 
  72             ARCH=amd64
  73             ;;
  74         sparc)





  75             ARCH=sparcv9


  76             ;;
  77     esac 
  78 fi
  79 
  80 if [ "$os" = "Linux" ]; then
  81     PLATFORM=linux
  82     ARCH=unknown
  83     case "`uname -m`" in
  84         i[3-6]86)
  85             ARCH=i586
  86             ;;
  87         ia64)
  88             ARCH=ia64
  89             ;;
  90         x86_64)
  91             ARCH=amd64
  92             ;;
  93     esac
  94 fi
  95