< prev index next >

test/hotspot/jtreg/test_env.sh

Print this page
rev 59383 : [mq]: final
   1 #!/bin/sh
   2 #
   3 #  Copyright (c) 2013, 2016, 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 # 


  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 TESTOPTS="${TESTVMOPTS} ${TESTJAVAOPTS}"
  54 echo "TESTOPTS=${TESTOPTS}"
  55 
  56 # set platform-dependent variables
  57 OS=`uname -s`
  58 case "$OS" in
  59   AIX | Darwin | Linux | SunOS )
  60     NULL=/dev/null
  61     PS=":"
  62     FS="/"
  63     RM=/bin/rm
  64     CP=/bin/cp
  65     MV=/bin/mv
  66     ;;
  67   Windows_* )
  68     NULL=NUL
  69     PS=";"
  70     FS="\\"
  71     RM=rm
  72     CP=cp
  73     MV=mv
  74     ;;
  75   CYGWIN_* )
  76     NULL=/dev/null
  77     PS=";"
  78     FS="/"
  79     RM=rm


 132 then
 133   VM_BITS="64"
 134 fi
 135 
 136 VM_OS="unknown"
 137 grep "aix" vm_version.out > ${NULL}
 138 if [ $? = 0 ]
 139 then
 140   VM_OS="aix"
 141 fi
 142 grep "bsd" vm_version.out > ${NULL}
 143 if [ $? = 0 ]
 144 then
 145   VM_OS="bsd"
 146 fi
 147 grep "linux" vm_version.out > ${NULL}
 148 if [ $? = 0 ]
 149 then
 150   VM_OS="linux"
 151 fi
 152 grep "solaris" vm_version.out > ${NULL}
 153 if [ $? = 0 ]
 154 then
 155   VM_OS="solaris"
 156 fi
 157 grep "windows" vm_version.out > ${NULL}
 158 if [ $? = 0 ]
 159 then
 160   VM_OS="windows"
 161 fi
 162 
 163 VM_CPU="unknown"
 164 grep "sparc" vm_version.out > ${NULL}
 165 if [ $? = 0 ]
 166 then
 167   VM_CPU="sparc"
 168   if [ $VM_BITS = "64" ]
 169   then
 170     VM_CPU="sparcv9"
 171   fi
 172 fi
 173 grep "x86" vm_version.out > ${NULL}
 174 if [ $? = 0 ]
 175 then
 176   VM_CPU="i386"
 177 fi
 178 grep "amd64" vm_version.out > ${NULL}
 179 if [ $? = 0 ]
 180 then
 181   VM_CPU="amd64"
 182 fi
 183 grep "arm" vm_version.out > ${NULL}
 184 if [ $? = 0 ]
 185 then
 186   VM_CPU="arm"
 187 fi
 188 grep "ppc" vm_version.out > ${NULL}
 189 if [ $? = 0 ]
 190 then
 191   VM_CPU="ppc"
 192   if [ $VM_BITS = "64" ]


   1 #!/bin/sh
   2 #
   3 #  Copyright (c) 2013, 2020, 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 # 


  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 TESTOPTS="${TESTVMOPTS} ${TESTJAVAOPTS}"
  54 echo "TESTOPTS=${TESTOPTS}"
  55 
  56 # set platform-dependent variables
  57 OS=`uname -s`
  58 case "$OS" in
  59   AIX | Darwin | Linux )
  60     NULL=/dev/null
  61     PS=":"
  62     FS="/"
  63     RM=/bin/rm
  64     CP=/bin/cp
  65     MV=/bin/mv
  66     ;;
  67   Windows_* )
  68     NULL=NUL
  69     PS=";"
  70     FS="\\"
  71     RM=rm
  72     CP=cp
  73     MV=mv
  74     ;;
  75   CYGWIN_* )
  76     NULL=/dev/null
  77     PS=";"
  78     FS="/"
  79     RM=rm


 132 then
 133   VM_BITS="64"
 134 fi
 135 
 136 VM_OS="unknown"
 137 grep "aix" vm_version.out > ${NULL}
 138 if [ $? = 0 ]
 139 then
 140   VM_OS="aix"
 141 fi
 142 grep "bsd" vm_version.out > ${NULL}
 143 if [ $? = 0 ]
 144 then
 145   VM_OS="bsd"
 146 fi
 147 grep "linux" vm_version.out > ${NULL}
 148 if [ $? = 0 ]
 149 then
 150   VM_OS="linux"
 151 fi





 152 grep "windows" vm_version.out > ${NULL}
 153 if [ $? = 0 ]
 154 then
 155   VM_OS="windows"
 156 fi
 157 
 158 VM_CPU="unknown"









 159 grep "x86" vm_version.out > ${NULL}
 160 if [ $? = 0 ]
 161 then
 162   VM_CPU="i386"
 163 fi
 164 grep "amd64" vm_version.out > ${NULL}
 165 if [ $? = 0 ]
 166 then
 167   VM_CPU="amd64"
 168 fi
 169 grep "arm" vm_version.out > ${NULL}
 170 if [ $? = 0 ]
 171 then
 172   VM_CPU="arm"
 173 fi
 174 grep "ppc" vm_version.out > ${NULL}
 175 if [ $? = 0 ]
 176 then
 177   VM_CPU="ppc"
 178   if [ $VM_BITS = "64" ]


< prev index next >