88 89 if [ -z "${TESTJAVA}" ] ; then 90 # TESTJAVA is not set, so the test is running stand-alone. 91 # TESTJAVA holds the path to the root directory of the build of the JDK 92 # to be tested. That is, any java files run explicitly in this shell 93 # should use TESTJAVA in the path to the java interpreter. 94 # So, we'll set this to the JDK spec'd on the command line. If none 95 # is given on the command line, tell the user that and use a cheesy 96 # default. 97 # THIS IS THE JDK BEING TESTED. 98 if [ -n "$1" ] ; 99 then TESTJAVA=$1 100 else fail "no JDK specified on command line!" 101 fi 102 TESTSRC=. 103 TESTCLASSES=. 104 STANDALONE=1; 105 fi 106 echo "JDK under test is: $TESTJAVA" 107 108 ##Deal with .class files: 109 #if [ -n "${STANDALONE}" ] ; then 110 # # then compile all .java files (if there are any) into .class files 111 # if [ -a *.java ]; then 112 # ${TESTJAVA}/bin/javac$ ./*.java ; 113 # fi 114 # # else in harness so copy all the class files from where jtreg put them 115 # # over to the scratch directory this test is running in. 116 # else cp ${TESTCLASSES}/*.class . ; 117 #fi 118 # 119 #if in test harness, then copy the entire directory that the test is in over 120 # to the scratch directory. This catches any support files needed by the test. 121 if [ -z "${STANDALONE}" ] ; 122 then cp ${TESTSRC}/* . 123 fi 124 case "$OS" in 125 Windows* | CYGWIN* ) 126 ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ 127 -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ 128 *.java 129 status=$? 130 if [ ! $status -eq "0" ]; then 131 fail "Compilation failed"; 132 fi 133 ;; 134 135 SunOS | Linux ) 136 ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ 137 -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ 138 *.java | 88 89 if [ -z "${TESTJAVA}" ] ; then 90 # TESTJAVA is not set, so the test is running stand-alone. 91 # TESTJAVA holds the path to the root directory of the build of the JDK 92 # to be tested. That is, any java files run explicitly in this shell 93 # should use TESTJAVA in the path to the java interpreter. 94 # So, we'll set this to the JDK spec'd on the command line. If none 95 # is given on the command line, tell the user that and use a cheesy 96 # default. 97 # THIS IS THE JDK BEING TESTED. 98 if [ -n "$1" ] ; 99 then TESTJAVA=$1 100 else fail "no JDK specified on command line!" 101 fi 102 TESTSRC=. 103 TESTCLASSES=. 104 STANDALONE=1; 105 fi 106 echo "JDK under test is: $TESTJAVA" 107 108 #if in test harness, then copy the entire directory that the test is in over 109 # to the scratch directory. This catches any support files needed by the test. 110 if [ -z "${STANDALONE}" ] ; 111 then cp ${TESTSRC}/* . 112 fi 113 case "$OS" in 114 Windows* | CYGWIN* ) 115 ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ 116 -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ 117 *.java 118 status=$? 119 if [ ! $status -eq "0" ]; then 120 fail "Compilation failed"; 121 fi 122 ;; 123 124 SunOS | Linux ) 125 ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ 126 -XaddExports:java.desktop/sun.awt=ALL-UNNAMED,java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ 127 *.java |