6877188: some javac shell tests do not work on Windows

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2009-08-28 14:48:49 -07:00
parent e4158efc0e
commit 45e9a3c1e9
8 changed files with 32 additions and 29 deletions

View file

@ -45,13 +45,13 @@ fi
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux )
NULL=/dev/null
PS=":"
FS="/" FS="/"
;; ;;
CYGWIN* )
FS="/"
DIFFOPTS="--strip-trailing-cr"
;;
Windows* ) Windows* )
NULL=NUL
PS=";"
FS="\\" FS="\\"
;; ;;
* ) * )
@ -68,7 +68,7 @@ rm -f Test.java Test.out
"${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -encoding IBM1047 Test.tmp Test.out "${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -encoding IBM1047 Test.tmp Test.out
diff -c "${TESTSRC}${FS}Test.out" Test.out diff ${DIFFOPTS} -c "${TESTSRC}${FS}Test.out" Test.out
result=$? result=$?
if [ $result -eq o ] if [ $result -eq o ]

View file

@ -42,13 +42,13 @@ fi
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux )
NULL=/dev/null
PS=":"
FS="/" FS="/"
;; ;;
CYGWIN* )
FS="/"
DIFFOPTS="--strip-trailing-cr"
;;
Windows* ) Windows* )
NULL=NUL
PS=";"
FS="\\" FS="\\"
;; ;;
* ) * )
@ -57,8 +57,8 @@ case "$OS" in
;; ;;
esac esac
"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d ${TC} -cp ${TC} -encoding iso-8859-1 -XD-printsource ${TS}${FS}T6302184.java 2>&1 > ${NULL} "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d ${TC} -cp ${TC} -encoding iso-8859-1 -XD-printsource ${TS}${FS}T6302184.java 2>&1
diff -c ${TC}${FS}T6302184.java ${TS}${FS}T6302184.out diff ${DIFFOPTS} -c ${TC}${FS}T6302184.java ${TS}${FS}T6302184.out
result=$? result=$?

View file

@ -56,14 +56,10 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | CYGWIN* )
NULL=/dev/null
PS=":"
FS="/" FS="/"
;; ;;
Windows* ) Windows* )
NULL=NUL
PS=";"
FS="\\" FS="\\"
;; ;;
* ) * )

View file

@ -55,12 +55,14 @@ echo "CLASSPATH=${CLASSPATH}"
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux )
NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
;; ;;
CYGWIN* )
PS=";" # native PS, not Cygwin PS
FS="/"
;;
Windows* ) Windows* )
NULL=NUL
PS=";" PS=";"
FS="\\" FS="\\"
;; ;;

View file

@ -53,12 +53,14 @@ echo "CLASSPATH=${CLASSPATH}"
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux )
NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
;; ;;
CYGWIN* )
PS=";" # native PS, not Cygwin PS
FS="/"
;;
Windows* ) Windows* )
NULL=NUL
PS=";" PS=";"
FS="\\" FS="\\"
;; ;;

View file

@ -42,14 +42,16 @@ fi
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux )
NULL=/dev/null
PS=":"
FS="/" FS="/"
SCR=`pwd`
;;
CYGWIN* )
FS="/"
SCR=`pwd | cygpath -d`
;; ;;
Windows* ) Windows* )
NULL=NUL
PS=";"
FS="\\" FS="\\"
SCR=`pwd`
;; ;;
* ) * )
echo "Unrecognized system!" echo "Unrecognized system!"

View file

@ -50,14 +50,10 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | CYGWIN* )
NULL=/dev/null
PS=":"
FS="/" FS="/"
;; ;;
Windows* ) Windows* )
NULL=NUL
PS=";"
FS="\\" FS="\\"
;; ;;
* ) * )

View file

@ -75,6 +75,11 @@ case "$OS" in
PS=";" PS=";"
FS="\\" FS="\\"
;; ;;
CYGWIN* )
ENV=""
PS=";" # platform PS, not cygwin PS
FS="/"
;;
* ) * )
echo "Unrecognized system!" echo "Unrecognized system!"
exit 1; exit 1;