test/runtime/7051189/Xchecksig.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
*** 27,64 ****
# @summary Need to suppress info message if -xcheck:jni used with libjsig.so
# @run shell Xchecksig.sh
#
if [ "${TESTSRC}" = "" ]
- then TESTSRC=.
- fi
-
- if [ "${TESTJAVA}" = "" ]
then
! PARENT=`dirname \`which java\``
! TESTJAVA=`dirname ${PARENT}`
! printf "TESTJAVA not set, selecting " ${TESTJAVA}
! printf " If this is incorrect, try setting the variable manually.\n"
fi
-
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
- FS="/"
- ;;
Windows_* | CYGWIN_* )
printf "Not testing libjsig.so on Windows. PASSED.\n "
exit 0
;;
- * )
- printf "Not testing libjsig.so on unrecognised system. PASSED.\n "
- exit 0
- ;;
esac
-
JAVA=${TESTJAVA}${FS}bin${FS}java
# LD_PRELOAD arch needs to match the binary we run, so run the java
# 64-bit binary directly if we are testing 64-bit (bin/ARCH/java).
# Check if TESTVMOPS contains -d64, but cannot use
--- 27,52 ----
# @summary Need to suppress info message if -xcheck:jni used with libjsig.so
# @run shell Xchecksig.sh
#
if [ "${TESTSRC}" = "" ]
then
! TESTSRC=${PWD}
! echo "TESTSRC not set. Using "${TESTSRC}" as default"
fi
+ echo "TESTSRC=${TESTSRC}"
+ ## Adding common setup Variables for running shell tests.
+ . ${TESTSRC}/../../test_env.sh
OS=`uname -s`
case "$OS" in
Windows_* | CYGWIN_* )
printf "Not testing libjsig.so on Windows. PASSED.\n "
exit 0
;;
esac
JAVA=${TESTJAVA}${FS}bin${FS}java
# LD_PRELOAD arch needs to match the binary we run, so run the java
# 64-bit binary directly if we are testing 64-bit (bin/ARCH/java).
# Check if TESTVMOPS contains -d64, but cannot use
*** 95,105 ****
printf "Not testing architecture $ARCH, skipping test.\n"
exit 0
;;
esac
! LIBJSIG=${TESTJAVA}${FS}jre${FS}lib${FS}${ARCH}${FS}libjsig.so
# If libjsig and binary do not match, skip test.
A=`file ${LIBJSIG} | awk '{ print $3 }'`
B=`file ${JAVA} | awk '{ print $3 }'`
--- 83,93 ----
printf "Not testing architecture $ARCH, skipping test.\n"
exit 0
;;
esac
! LIBJSIG=${COMPILEJAVA}${FS}jre${FS}lib${FS}${ARCH}${FS}libjsig.so
# If libjsig and binary do not match, skip test.
A=`file ${LIBJSIG} | awk '{ print $3 }'`
B=`file ${JAVA} | awk '{ print $3 }'`