22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 #
27 # @test
28 # @bug 4954921 8009259
29 # @summary Ensure that if a cleaner throws an exception then the VM exits
30 #
31 # @build ExitOnThrow
32 # @run shell exitOnThrow.sh
33
34 # Command-line usage: sh exitOnThrow.sh /path/to/build
35
36 if [ -z "$TESTJAVA" ]; then
37 if [ $# -lt 1 ]; then exit 1; fi
38 TESTJAVA=$1; shift
39 TESTCLASSES=`pwd`
40 fi
41
42 if $TESTJAVA/bin/java ${TESTVMOPTS} -cp $TESTCLASSES ExitOnThrow; then
43 echo Failed: VM exited normally
44 exit 1
45 else
46 echo Passed: VM exited with code $?
47 exit 0
48 fi
|
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 #
27 # @test
28 # @bug 4954921 8009259
29 # @summary Ensure that if a cleaner throws an exception then the VM exits
30 #
31 # @build ExitOnThrow
32 # @run shell exitOnThrow.sh
33
34 # Command-line usage: sh exitOnThrow.sh /path/to/build
35
36 if [ -z "$TESTJAVA" ]; then
37 if [ $# -lt 1 ]; then exit 1; fi
38 TESTJAVA=$1; shift
39 TESTCLASSES=`pwd`
40 fi
41
42 if $TESTJAVA/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} -cp $TESTCLASSES ExitOnThrow; then
43 echo Failed: VM exited normally
44 exit 1
45 else
46 echo Passed: VM exited with code $?
47 exit 0
48 fi
|