jdk/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh
changeset 15669 0923fe344df6
parent 15654 aa1e472aa6b9
child 16017 0742f7c261fe
equal deleted inserted replaced
15668:c5d8a90a4b40 15669:0923fe344df6
    21 # questions.
    21 # questions.
    22 #
    22 #
    23 
    23 
    24 # @test
    24 # @test
    25 # @bug 7182152
    25 # @bug 7182152
       
    26 # @bug 8007935
    26 # @summary Redefine a subclass that implements two interfaces and
    27 # @summary Redefine a subclass that implements two interfaces and
    27 #   verify that the right methods are called.
    28 #   verify that the right methods are called.
    28 # @author Daniel D. Daugherty
    29 # @author Daniel D. Daugherty
    29 #
    30 #
    30 # @run shell MakeJAR3.sh RedefineSubclassWithTwoInterfacesAgent 'Can-Redefine-Classes: true'
    31 # @run shell MakeJAR3.sh RedefineSubclassWithTwoInterfacesAgent 'Can-Redefine-Classes: true'
    36 then
    37 then
    37   echo "TESTJAVA not set.  Test cannot execute.  Failed."
    38   echo "TESTJAVA not set.  Test cannot execute.  Failed."
    38   exit 1
    39   exit 1
    39 fi
    40 fi
    40 
    41 
       
    42 if [ "${COMPILEJAVA}" = "" ]
       
    43 then
       
    44   COMPILEJAVA="${TESTJAVA}"
       
    45 fi
       
    46 echo "COMPILEJAVA=${COMPILEJAVA}"
       
    47 
    41 if [ "${TESTSRC}" = "" ]
    48 if [ "${TESTSRC}" = "" ]
    42 then
    49 then
    43   echo "TESTSRC not set.  Test cannot execute.  Failed."
    50   echo "TESTSRC not set.  Test cannot execute.  Failed."
    44   exit 1
    51   exit 1
    45 fi
    52 fi
    48 then
    55 then
    49   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
    56   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
    50   exit 1
    57   exit 1
    51 fi
    58 fi
    52 
    59 
    53 JAVAC="${TESTJAVA}"/bin/javac
    60 JAVAC="${COMPILEJAVA}"/bin/javac
    54 JAVA="${TESTJAVA}"/bin/java
    61 JAVA="${TESTJAVA}"/bin/java
    55 
    62 
    56 echo "INFO: building the replacement classes."
    63 echo "INFO: building the replacement classes."
    57 
    64 
    58 cp "${TESTSRC}"/RedefineSubclassWithTwoInterfacesTarget_1.java \
    65 cp "${TESTSRC}"/RedefineSubclassWithTwoInterfacesTarget_1.java \
    59     RedefineSubclassWithTwoInterfacesTarget.java
    66     RedefineSubclassWithTwoInterfacesTarget.java
    60 cp "${TESTSRC}"/RedefineSubclassWithTwoInterfacesImpl_1.java \
    67 cp "${TESTSRC}"/RedefineSubclassWithTwoInterfacesImpl_1.java \
    61     RedefineSubclassWithTwoInterfacesImpl.java
    68     RedefineSubclassWithTwoInterfacesImpl.java
    62 "${JAVAC}" -cp "${TESTCLASSES}" -d . \
    69 "${JAVAC}" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
       
    70     -cp "${TESTCLASSES}" -d . \
    63     RedefineSubclassWithTwoInterfacesTarget.java \
    71     RedefineSubclassWithTwoInterfacesTarget.java \
    64     RedefineSubclassWithTwoInterfacesImpl.java 
    72     RedefineSubclassWithTwoInterfacesImpl.java 
    65 status="$?"
    73 status="$?"
    66 if [ "$status" != 0 ]; then
    74 if [ "$status" != 0 ]; then
    67     echo "FAIL: compile of *_1.java files failed."
    75     echo "FAIL: compile of *_1.java files failed."