changeset 410:f0c9fc46990b

6877188: some javac shell tests do not work on Windows Reviewed-by: darcy
author jjg
date Fri, 28 Aug 2009 14:48:49 -0700
parents 0ba956343648
children ce5be4c09f2a
files test/tools/javac/4846262/Test.sh test/tools/javac/6302184/T6302184.sh test/tools/javac/ClassPathTest/ClassPathTest.sh test/tools/javac/ExtDirs/ExtDirs.sh test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh test/tools/javac/javazip/Test.sh test/tools/javac/newlines/Newlines.sh test/tools/javac/unicode/SupplementaryJavaID6.sh
diffstat 8 files changed, 32 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/4846262/Test.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/4846262/Test.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -45,13 +45,13 @@
 OS=`uname -s`
 case "$OS" in
   SunOS | Linux )
-    NULL=/dev/null
-    PS=":"
     FS="/"
     ;;
+  CYGWIN* )
+    FS="/"
+    DIFFOPTS="--strip-trailing-cr"
+    ;;
   Windows* )
-    NULL=NUL
-    PS=";"
     FS="\\"
     ;;
   * )
@@ -68,7 +68,7 @@
 
 "${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=$?
 
 if [ $result -eq o ]
--- a/test/tools/javac/6302184/T6302184.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/6302184/T6302184.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -42,13 +42,13 @@
 OS=`uname -s`
 case "$OS" in
   SunOS | Linux )
-    NULL=/dev/null
-    PS=":"
     FS="/"
     ;;
+  CYGWIN* )
+    FS="/"
+    DIFFOPTS="--strip-trailing-cr"
+    ;;
   Windows* )
-    NULL=NUL
-    PS=";"
     FS="\\"
     ;;
   * )
@@ -57,8 +57,8 @@
     ;;
 esac
 
-"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d ${TC} -cp ${TC} -encoding iso-8859-1 -XD-printsource ${TS}${FS}T6302184.java 2>&1 > ${NULL}
-diff -c ${TC}${FS}T6302184.java ${TS}${FS}T6302184.out
+"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d ${TC} -cp ${TC} -encoding iso-8859-1 -XD-printsource ${TS}${FS}T6302184.java 2>&1
+diff ${DIFFOPTS} -c ${TC}${FS}T6302184.java ${TS}${FS}T6302184.out
 result=$?
 
 
--- a/test/tools/javac/ClassPathTest/ClassPathTest.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/ClassPathTest/ClassPathTest.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -56,14 +56,10 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
-    NULL=/dev/null
-    PS=":"
+  SunOS | Linux | CYGWIN* )
     FS="/"
     ;;
   Windows* )
-    NULL=NUL
-    PS=";"
     FS="\\"
     ;;
   * )
--- a/test/tools/javac/ExtDirs/ExtDirs.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/ExtDirs/ExtDirs.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -55,12 +55,14 @@
 OS=`uname -s`
 case "$OS" in
   SunOS | Linux )
-    NULL=/dev/null
     PS=":"
     FS="/"
     ;;
+  CYGWIN* )
+    PS=";" # native PS, not Cygwin PS
+    FS="/"
+    ;;
   Windows* )
-    NULL=NUL
     PS=";"
     FS="\\"
     ;;
--- a/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -53,12 +53,14 @@
 OS=`uname -s`
 case "$OS" in
   SunOS | Linux )
-    NULL=/dev/null
     PS=":"
     FS="/"
     ;;
+  CYGWIN* ) 
+    PS=";" # native PS, not Cygwin PS
+    FS="/"
+    ;;
   Windows* )
-    NULL=NUL
     PS=";"
     FS="\\"
     ;;
--- a/test/tools/javac/javazip/Test.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/javazip/Test.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -42,14 +42,16 @@
 OS=`uname -s`
 case "$OS" in
   SunOS | Linux )
-    NULL=/dev/null
-    PS=":"
     FS="/"
+    SCR=`pwd`
+    ;;
+  CYGWIN* )
+    FS="/"
+    SCR=`pwd | cygpath -d`
     ;;
   Windows* )
-    NULL=NUL
-    PS=";"
     FS="\\"
+    SCR=`pwd`
     ;;
   * )
     echo "Unrecognized system!"
--- a/test/tools/javac/newlines/Newlines.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/newlines/Newlines.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -50,14 +50,10 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
-    NULL=/dev/null
-    PS=":"
+  SunOS | Linux | CYGWIN* )
     FS="/"
     ;;
   Windows* )
-    NULL=NUL
-    PS=";"
     FS="\\"
     ;;
   * )
--- a/test/tools/javac/unicode/SupplementaryJavaID6.sh	Fri Aug 28 12:12:08 2009 -0700
+++ b/test/tools/javac/unicode/SupplementaryJavaID6.sh	Fri Aug 28 14:48:49 2009 -0700
@@ -75,6 +75,11 @@
     PS=";"
     FS="\\"
     ;;
+  CYGWIN* )
+    ENV=""
+    PS=";" # platform PS, not cygwin PS
+    FS="/"
+    ;;
   * )
     echo "Unrecognized system!"
     exit 1;