57
58 # The beginning of the script proper
59
60 TARGETCLASS="HelloWorld"
61 if [ -z "${TESTJAVA}" ] ; then
62 # TESTJAVA is not set, so the test is running stand-alone.
63 # TESTJAVA holds the path to the root directory of the build of the JDK
64 # to be tested. That is, any java files run explicitly in this shell
65 # should use TESTJAVA in the path to the java interpreter.
66 # So, we'll set this to the JDK spec'd on the command line. If none
67 # is given on the command line, tell the user that and use a default.
68 # THIS IS THE JDK BEING TESTED.
69 if [ -n "$1" ] ; then
70 TESTJAVA=$1
71 else
72 TESTJAVA=$JAVA_HOME
73 fi
74 TESTSRC=.
75 TESTCLASSES=.
76 #Deal with .class files:
77 ${TESTJAVA}/bin/javac -d ${TESTCLASSES} \
78 -classpath "${TESTCLASSES}" -g \
79 ${TARGETCLASS}.java
80 fi
81 #
82 echo "JDK under test is: $TESTJAVA"
83
84 # Get flags being sent to debuggee
85 DEBUGGEEFLAGS=
86 if [ -r $TESTCLASSES/@debuggeeVMOptions ] ; then
87 DEBUGGEEFLAGS=`cat $TESTCLASSES/@debuggeeVMOptions`
88 elif [ -r $TESTCLASSES/../@debuggeeVMOptions ] ; then
89 DEBUGGEEFLAGS=`cat $TESTCLASSES/../@debuggeeVMOptions`
90 fi
91
92 # Figure out what the libarch path is
93 os=`uname -s`
94
95 jreloc=${TESTJAVA}/jre
96 if [ ! -d ${jreloc} ] ; then
97 jreloc=${TESTJAVA}
172 echo "cannot find dt_socket in ${libloc} for ${private_transport}"
173 fail "cannot find dt_socket in ${libloc} for ${private_transport}"
174 fi
175
176 #
177 CP="-classpath \"${TESTCLASSES}\""
178 #
179 if [ "$is_windows" = "true" ]; then
180 if [ "$is_cygwin" = "true" ]; then
181 win_fullpath=`cygpath -m "$fullpath" \
182 | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'`
183 else
184 win_fullpath=`echo "$fullpath" \
185 | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'`
186 fi
187 DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${win_fullpath},server=y,suspend=n"
188 else
189 DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${private_transport},server=y,suspend=n"
190 fi
191
192 echo ${TESTJAVA}/bin/java ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS}
193 eval ${TESTJAVA}/bin/java ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS}
194 status=$?
195 echo "test status for ${DEBUGGERFLAGS} was: $status"
196 if [ $status -ne 0 ] ; then
197 fail "unspecified test failure"
198 exit 1
199 fi
200
201 pass "found private transport library"
202 exit 0
203
|
57
58 # The beginning of the script proper
59
60 TARGETCLASS="HelloWorld"
61 if [ -z "${TESTJAVA}" ] ; then
62 # TESTJAVA is not set, so the test is running stand-alone.
63 # TESTJAVA holds the path to the root directory of the build of the JDK
64 # to be tested. That is, any java files run explicitly in this shell
65 # should use TESTJAVA in the path to the java interpreter.
66 # So, we'll set this to the JDK spec'd on the command line. If none
67 # is given on the command line, tell the user that and use a default.
68 # THIS IS THE JDK BEING TESTED.
69 if [ -n "$1" ] ; then
70 TESTJAVA=$1
71 else
72 TESTJAVA=$JAVA_HOME
73 fi
74 TESTSRC=.
75 TESTCLASSES=.
76 #Deal with .class files:
77 ${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS} -d ${TESTCLASSES} \
78 -classpath "${TESTCLASSES}" -g \
79 ${TARGETCLASS}.java
80 fi
81 #
82 echo "JDK under test is: $TESTJAVA"
83
84 # Get flags being sent to debuggee
85 DEBUGGEEFLAGS=
86 if [ -r $TESTCLASSES/@debuggeeVMOptions ] ; then
87 DEBUGGEEFLAGS=`cat $TESTCLASSES/@debuggeeVMOptions`
88 elif [ -r $TESTCLASSES/../@debuggeeVMOptions ] ; then
89 DEBUGGEEFLAGS=`cat $TESTCLASSES/../@debuggeeVMOptions`
90 fi
91
92 # Figure out what the libarch path is
93 os=`uname -s`
94
95 jreloc=${TESTJAVA}/jre
96 if [ ! -d ${jreloc} ] ; then
97 jreloc=${TESTJAVA}
172 echo "cannot find dt_socket in ${libloc} for ${private_transport}"
173 fail "cannot find dt_socket in ${libloc} for ${private_transport}"
174 fi
175
176 #
177 CP="-classpath \"${TESTCLASSES}\""
178 #
179 if [ "$is_windows" = "true" ]; then
180 if [ "$is_cygwin" = "true" ]; then
181 win_fullpath=`cygpath -m "$fullpath" \
182 | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'`
183 else
184 win_fullpath=`echo "$fullpath" \
185 | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'`
186 fi
187 DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${win_fullpath},server=y,suspend=n"
188 else
189 DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${private_transport},server=y,suspend=n"
190 fi
191
192 echo ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS}
193 eval ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS}
194 status=$?
195 echo "test status for ${DEBUGGERFLAGS} was: $status"
196 if [ $status -ne 0 ] ; then
197 fail "unspecified test failure"
198 exit 1
199 fi
200
201 pass "found private transport library"
202 exit 0
203
|