28 # printed if vmStructs are consistent. Else, "FAILED" is 29 # printed and an exception stack trace follows. 30 31 usage() { 32 echo "usage: ./sasanity.sh <jdk>" 33 echo "<jdk> is the 1.5 j2se directory against which you want to run sanity check" 34 exit 1 35 } 36 37 if [ "$1" == "" ]; then 38 usage 39 fi 40 41 if [ "$1" == "-help" ]; then 42 usage 43 fi 44 45 jdk=$1 46 OS=`uname` 47 48 if [ "$OS" != "Linux" ]; then 49 OPTIONS="-Dsun.jvm.hotspot.debugger.useProcDebugger" 50 fi 51 52 javacp=$jdk/lib/sa-jdi.jar:./workdir 53 54 mkdir -p workdir 55 if [ SASanityChecker.java -nt ./workdir/SASanityChecker.class ] ; then 56 $jdk/bin/javac -d ./workdir -classpath $javacp SASanityChecker.java 57 if [ $? != 0 ] ; then 58 exit 1 59 fi 60 fi 61 62 if [ sagtarg.java -nt ./workdir/sagtarg.class ]; then 63 $jdk/bin/javac -g -classpath -d $workdir sagtarg.java 64 if [ $? != 0 ] ; then 65 exit 1 66 fi 67 fi 68 69 tmp=/tmp/sagsetup 70 rm -f $tmp 71 $jdk/bin/java sagtarg > $tmp & | 28 # printed if vmStructs are consistent. Else, "FAILED" is 29 # printed and an exception stack trace follows. 30 31 usage() { 32 echo "usage: ./sasanity.sh <jdk>" 33 echo "<jdk> is the 1.5 j2se directory against which you want to run sanity check" 34 exit 1 35 } 36 37 if [ "$1" == "" ]; then 38 usage 39 fi 40 41 if [ "$1" == "-help" ]; then 42 usage 43 fi 44 45 jdk=$1 46 OS=`uname` 47 48 javacp=$jdk/lib/sa-jdi.jar:./workdir 49 50 mkdir -p workdir 51 if [ SASanityChecker.java -nt ./workdir/SASanityChecker.class ] ; then 52 $jdk/bin/javac -d ./workdir -classpath $javacp SASanityChecker.java 53 if [ $? != 0 ] ; then 54 exit 1 55 fi 56 fi 57 58 if [ sagtarg.java -nt ./workdir/sagtarg.class ]; then 59 $jdk/bin/javac -g -classpath -d $workdir sagtarg.java 60 if [ $? != 0 ] ; then 61 exit 1 62 fi 63 fi 64 65 tmp=/tmp/sagsetup 66 rm -f $tmp 67 $jdk/bin/java sagtarg > $tmp & |