< prev index next >

test/test_env.sh

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


  36 echo "TESTJAVA=${TESTJAVA}"
  37 
  38 # COMPILEJAVA requires a JDK, some shell test use javac,jar,etc 
  39 if [ "${COMPILEJAVA}" = "" ]
  40 then
  41  echo "COMPILEJAVA not set.  Using TESTJAVA as default"
  42  COMPILEJAVA=${TESTJAVA}
  43 fi
  44 echo "COMPILEJAVA=${COMPILEJAVA}"
  45 
  46 if [ "${TESTCLASSES}" = "" ]
  47 then
  48   echo "TESTCLASES not set.  Using "." as default"
  49   TESTCLASSES=.
  50 fi
  51 echo "TESTCLASSES=${TESTCLASSES}"
  52 
  53 # set platform-dependent variables
  54 OS=`uname -s`
  55 case "$OS" in
  56   SunOS | Linux | Darwin )
  57     NULL=/dev/null
  58     PS=":"
  59     FS="/"
  60     RM=/bin/rm
  61     CP=/bin/cp
  62     MV=/bin/mv
  63     ;;
  64   Windows_* )
  65     NULL=NUL
  66     PS=";"
  67     FS="\\"
  68     RM=rm
  69     CP=cp
  70     MV=mv
  71     ;;
  72   CYGWIN_* )
  73     NULL=/dev/null
  74     PS=";"
  75     FS="/"
  76     RM=rm


 113 VM_TYPE="unknown"
 114 grep "Server" vm_version.out > ${NULL}
 115 if [ $? = 0 ]
 116 then
 117   VM_TYPE="server"
 118 fi
 119 grep "Client" vm_version.out > ${NULL}
 120 if [ $? = 0 ]
 121 then
 122   VM_TYPE="client"
 123 fi
 124 
 125 VM_BITS="32"
 126 grep "64-Bit" vm_version.out > ${NULL}
 127 if [ $? = 0 ]
 128 then
 129   VM_BITS="64"
 130 fi
 131 
 132 VM_OS="unknown"
 133 grep "solaris" vm_version.out > ${NULL}
 134 if [ $? = 0 ]
 135 then
 136   VM_OS="solaris"





 137 fi
 138 grep "linux" vm_version.out > ${NULL}
 139 if [ $? = 0 ]
 140 then
 141   VM_OS="linux"
 142 fi
 143 grep "windows" vm_version.out > ${NULL}
 144 if [ $? = 0 ]
 145 then
 146   VM_OS="windows"
 147 fi
 148 grep "bsd" vm_version.out > ${NULL}
 149 if [ $? = 0 ]
 150 then
 151   VM_OS="bsd"
 152 fi
 153 
 154 VM_CPU="unknown"
 155 grep "sparc" vm_version.out > ${NULL}
 156 if [ $? = 0 ]
 157 then
 158   VM_CPU="sparc"
 159   if [ $VM_BITS = "64" ]
 160   then
 161     VM_CPU="sparcv9"
 162   fi
 163 fi
 164 grep "x86" vm_version.out > ${NULL}
 165 if [ $? = 0 ]
 166 then
 167   VM_CPU="i386"
 168 fi
 169 grep "amd64" vm_version.out > ${NULL}
 170 if [ $? = 0 ]
 171 then


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


  36 echo "TESTJAVA=${TESTJAVA}"
  37 
  38 # COMPILEJAVA requires a JDK, some shell test use javac,jar,etc 
  39 if [ "${COMPILEJAVA}" = "" ]
  40 then
  41  echo "COMPILEJAVA not set.  Using TESTJAVA as default"
  42  COMPILEJAVA=${TESTJAVA}
  43 fi
  44 echo "COMPILEJAVA=${COMPILEJAVA}"
  45 
  46 if [ "${TESTCLASSES}" = "" ]
  47 then
  48   echo "TESTCLASES not set.  Using "." as default"
  49   TESTCLASSES=.
  50 fi
  51 echo "TESTCLASSES=${TESTCLASSES}"
  52 
  53 # set platform-dependent variables
  54 OS=`uname -s`
  55 case "$OS" in
  56   AIX | Darwin | Linux | SunOS )
  57     NULL=/dev/null
  58     PS=":"
  59     FS="/"
  60     RM=/bin/rm
  61     CP=/bin/cp
  62     MV=/bin/mv
  63     ;;
  64   Windows_* )
  65     NULL=NUL
  66     PS=";"
  67     FS="\\"
  68     RM=rm
  69     CP=cp
  70     MV=mv
  71     ;;
  72   CYGWIN_* )
  73     NULL=/dev/null
  74     PS=";"
  75     FS="/"
  76     RM=rm


 113 VM_TYPE="unknown"
 114 grep "Server" vm_version.out > ${NULL}
 115 if [ $? = 0 ]
 116 then
 117   VM_TYPE="server"
 118 fi
 119 grep "Client" vm_version.out > ${NULL}
 120 if [ $? = 0 ]
 121 then
 122   VM_TYPE="client"
 123 fi
 124 
 125 VM_BITS="32"
 126 grep "64-Bit" vm_version.out > ${NULL}
 127 if [ $? = 0 ]
 128 then
 129   VM_BITS="64"
 130 fi
 131 
 132 VM_OS="unknown"
 133 grep "aix" vm_version.out > ${NULL}
 134 if [ $? = 0 ]
 135 then
 136   VM_OS="aix"
 137 fi
 138 grep "bsd" vm_version.out > ${NULL}
 139 if [ $? = 0 ]
 140 then
 141   VM_OS="bsd"
 142 fi
 143 grep "linux" vm_version.out > ${NULL}
 144 if [ $? = 0 ]
 145 then
 146   VM_OS="linux"
 147 fi
 148 grep "solaris" vm_version.out > ${NULL}
 149 if [ $? = 0 ]
 150 then
 151   VM_OS="solaris"
 152 fi
 153 grep "windows" vm_version.out > ${NULL}
 154 if [ $? = 0 ]
 155 then
 156   VM_OS="windows"
 157 fi
 158 
 159 VM_CPU="unknown"
 160 grep "sparc" vm_version.out > ${NULL}
 161 if [ $? = 0 ]
 162 then
 163   VM_CPU="sparc"
 164   if [ $VM_BITS = "64" ]
 165   then
 166     VM_CPU="sparcv9"
 167   fi
 168 fi
 169 grep "x86" vm_version.out > ${NULL}
 170 if [ $? = 0 ]
 171 then
 172   VM_CPU="i386"
 173 fi
 174 grep "amd64" vm_version.out > ${NULL}
 175 if [ $? = 0 ]
 176 then


< prev index next >