32 ## @bug 7037122 |
32 ## @bug 7037122 |
33 ## @bug 7123945 |
33 ## @bug 7123945 |
34 ## @summary Verifier heap corruption, relating to backward jsrs |
34 ## @summary Verifier heap corruption, relating to backward jsrs |
35 ## @run shell Test6878713.sh |
35 ## @run shell Test6878713.sh |
36 ## |
36 ## |
37 |
37 ## some tests require path to find test source dir |
38 if [ "${TESTSRC}" = "" ] |
38 if [ "${TESTSRC}" = "" ] |
39 then TESTSRC=. |
39 then |
|
40 TESTSRC=${PWD} |
|
41 echo "TESTSRC not set. Using "${TESTSRC}" as default" |
40 fi |
42 fi |
41 |
43 echo "TESTSRC=${TESTSRC}" |
42 if [ "${TESTJAVA}" = "" ] |
44 ## Adding common setup Variables for running shell tests. |
43 then |
45 . ${TESTSRC}/../../test_env.sh |
44 PARENT=`dirname \`which java\`` |
|
45 TESTJAVA=`dirname ${PARENT}` |
|
46 echo "TESTJAVA not set, selecting " ${TESTJAVA} |
|
47 echo "If this is incorrect, try setting the variable manually." |
|
48 fi |
|
49 |
|
50 if [ "${TESTCLASSES}" = "" ] |
|
51 then |
|
52 echo "TESTCLASSES not set. Test cannot execute. Failed." |
|
53 exit 1 |
|
54 fi |
|
55 |
|
56 # set platform-dependent variables |
|
57 OS=`uname -s` |
|
58 case "$OS" in |
|
59 SunOS | Linux | Darwin ) |
|
60 NULL=/dev/null |
|
61 PS=":" |
|
62 FS="/" |
|
63 ;; |
|
64 Windows_* ) |
|
65 NULL=NUL |
|
66 PS=";" |
|
67 FS="\\" |
|
68 ;; |
|
69 CYGWIN_* ) |
|
70 NULL=/dev/null |
|
71 PS=";" |
|
72 FS="/" |
|
73 ;; |
|
74 * ) |
|
75 echo "Unrecognized system!" |
|
76 exit 1; |
|
77 ;; |
|
78 esac |
|
79 |
|
80 CLASSPATH=.${PS}${TESTCLASSES} ; export CLASSPATH |
|
81 |
|
82 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version |
|
83 |
46 |
84 TARGET_CLASS=OOMCrashClass1960_2 |
47 TARGET_CLASS=OOMCrashClass1960_2 |
85 |
48 |
86 echo "INFO: extracting the target class." |
49 echo "INFO: extracting the target class." |
87 ${TESTJAVA}${FS}bin${FS}jar xvf \ |
50 ${COMPILEJAVA}${FS}bin${FS}jar xvf \ |
88 ${TESTSRC}${FS}testcase.jar ${TARGET_CLASS}.class |
51 ${TESTSRC}${FS}testcase.jar ${TARGET_CLASS}.class |
89 |
52 |
90 # remove any hs_err_pid that might exist here |
53 # remove any hs_err_pid that might exist here |
91 rm -f hs_err_pid*.log |
54 rm -f hs_err_pid*.log |
92 |
55 |