test/compiler/7200264/Test7200264.sh

Print this page
rev 4503 : 8009152: A number of jtreg tests need review/improvement
Summary: Added a new test_env.txt file to capture common shell variable. Added concept of COMPILEJAVA for use when TESTJAVA is a JRE. If COMPILEJAVA not set then TESTJAVA will be the default with assumption it is a JDK.
Reviewed-by: kvn, brutisso, coleenp


   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 # 
  24 # 
  25 

  26 if [ "${TESTSRC}" = "" ]
  27 then
  28   echo "TESTSRC not set.  Test cannot execute.  Failed."
  29   exit 1
  30 fi
  31 echo "TESTSRC=${TESTSRC}"
  32 if [ "${TESTJAVA}" = "" ]
  33 then
  34   echo "TESTJAVA not set.  Test cannot execute.  Failed."
  35   exit 1
  36 fi
  37 echo "TESTJAVA=${TESTJAVA}"
  38 if [ "${TESTCLASSES}" = "" ]
  39 then
  40   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
  41   exit 1
  42 fi
  43 echo "TESTCLASSES=${TESTCLASSES}"
  44 echo "CLASSPATH=${CLASSPATH}"
  45 
  46 # set platform-dependent variables
  47 OS=`uname -s`
  48 case "$OS" in
  49   SunOS | Linux | Darwin )
  50     NULL=/dev/null
  51     PS=":"
  52     FS="/"
  53     ;;
  54   Windows_* )
  55     NULL=NUL
  56     PS=";"
  57     FS="\\"
  58     ;;
  59   CYGWIN_* )
  60     NULL=/dev/null
  61     PS=";"
  62     FS="/"
  63     ;;
  64   * )
  65     echo "Unrecognized system!"
  66     exit 1;
  67     ;;
  68 esac
  69 
  70 
  71 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
  72 
  73 # Only test fastdebug Server VM on x86
  74 if [ $? != 0 ]
  75 then
  76     echo "Test Passed"
  77     exit 0
  78 fi
  79 
  80 # grep for support integer multiply vectors (cpu with SSE4.1)
  81 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintMiscellaneous -XX:+Verbose -version | grep "cores per cpu" | grep "sse4.1"
  82 
  83 if [ $? != 0 ]
  84 then
  85     SSE=2
  86 else
  87     SSE=4
  88 fi
  89 
  90 cp ${TESTSRC}${FS}TestIntVect.java .
  91 ${TESTJAVA}${FS}bin${FS}javac -d . TestIntVect.java
  92 
  93 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
  94 
  95 COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'`
  96 if [ $COUNT -lt 4 ]
  97 then
  98     echo "Test Failed: AddVI $COUNT < 4"
  99     exit 1
 100 fi
 101 
 102 # AddVI is generated for test_subc
 103 COUNT=`grep SubVI test.out | wc -l | awk '{print $1}'`
 104 if [ $COUNT -lt 4 ]
 105 then
 106     echo "Test Failed: SubVI $COUNT < 4"
 107     exit 1
 108 fi
 109 
 110 # MulVI is only supported with SSE4.1.
 111 if [ $SSE -gt 3 ]




   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 # 
  24 # 
  25 
  26 ## some tests require path to find test source dir
  27 if [ "${TESTSRC}" = "" ]
  28 then
  29   TESTSRC=${PWD}
  30   echo "TESTSRC not set.  Using "${TESTSRC}" as default"
  31 fi
  32 echo "TESTSRC=${TESTSRC}"
  33 ## Adding common setup Variables for running shell tests.
  34 . ${TESTSRC}/../../test_env.sh











  35 

























  36 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
  37 
  38 # Only test fastdebug Server VM on x86
  39 if [ $? != 0 ]
  40 then
  41     echo "Test Passed"
  42     exit 0
  43 fi
  44 
  45 # grep for support integer multiply vectors (cpu with SSE4.1)
  46 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintMiscellaneous -XX:+Verbose -version | grep "cores per cpu" | grep "sse4.1"
  47 
  48 if [ $? != 0 ]
  49 then
  50     SSE=2
  51 else
  52     SSE=4
  53 fi
  54 
  55 cp ${TESTSRC}${FS}TestIntVect.java .
  56 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} -d . TestIntVect.java
  57 
  58 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
  59 
  60 COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'`
  61 if [ $COUNT -lt 4 ]
  62 then
  63     echo "Test Failed: AddVI $COUNT < 4"
  64     exit 1
  65 fi
  66 
  67 # AddVI is generated for test_subc
  68 COUNT=`grep SubVI test.out | wc -l | awk '{print $1}'`
  69 if [ $COUNT -lt 4 ]
  70 then
  71     echo "Test Failed: SubVI $COUNT < 4"
  72     exit 1
  73 fi
  74 
  75 # MulVI is only supported with SSE4.1.
  76 if [ $SSE -gt 3 ]