Mon, 31 Aug 2009 12:36:26 -0700
6877229: more javac tests fail on Windows
Reviewed-by: darcy
1.1 --- a/test/tools/javac/6589361/T6589361.java Fri Aug 28 16:54:10 2009 -0700 1.2 +++ b/test/tools/javac/6589361/T6589361.java Mon Aug 31 12:36:26 2009 -0700 1.3 @@ -23,8 +23,9 @@ 1.4 set.add(JavaFileObject.Kind.CLASS); 1.5 Iterable<JavaFileObject> files = fm.list(StandardLocation.PLATFORM_CLASS_PATH, "java.lang", set, false); 1.6 for (JavaFileObject file : files) { 1.7 - 1.8 - if (file.toString().contains("java" + File.separator + "lang" + File.separator + "Object.class")) { 1.9 + // Note: Zip/Jar entry names use '/', not File.separator, but just to be sure, 1.10 + // we normalize the filename as well. 1.11 + if (file.toString().replace(File.separatorChar, '/').contains("java/lang/Object.class")) { 1.12 String str = fm.inferBinaryName(StandardLocation.CLASS_PATH, file); 1.13 if (!str.equals("java.lang.Object")) { 1.14 throw new AssertionError("Error in JavacFileManager.inferBinaryName method!"); 1.15 @@ -40,7 +41,7 @@ 1.16 fm.close(); 1.17 } 1.18 } 1.19 - throw new AssertionError("Could not fing java/lang/Object.class while compiling"); 1.20 + throw new AssertionError("Could not find java/lang/Object.class while compiling"); 1.21 } 1.22 1.23 }
2.1 --- a/test/tools/javac/MissingInclude.sh Fri Aug 28 16:54:10 2009 -0700 2.2 +++ b/test/tools/javac/MissingInclude.sh Mon Aug 31 12:36:26 2009 -0700 2.3 @@ -47,14 +47,10 @@ 2.4 # set platform-dependent variables 2.5 OS=`uname -s` 2.6 case "$OS" in 2.7 - SunOS | Linux ) 2.8 - NULL=/dev/null 2.9 - PS=":" 2.10 + SunOS | Linux | CYGWIN* ) 2.11 FS="/" 2.12 ;; 2.13 Windows* ) 2.14 - NULL=NUL 2.15 - PS=";" 2.16 FS="\\" 2.17 ;; 2.18 * )
3.1 --- a/test/tools/javac/T5090006/compiler.sh Fri Aug 28 16:54:10 2009 -0700 3.2 +++ b/test/tools/javac/T5090006/compiler.sh Mon Aug 31 12:36:26 2009 -0700 3.3 @@ -47,14 +47,10 @@ 3.4 # set platform-dependent variables 3.5 OS=`uname -s` 3.6 case "$OS" in 3.7 - SunOS | Linux ) 3.8 - NULL=/dev/null 3.9 - PS=":" 3.10 + SunOS | Linux | CYGWIN* ) 3.11 FS="/" 3.12 ;; 3.13 Windows* ) 3.14 - NULL=NUL 3.15 - PS=";" 3.16 FS="\\" 3.17 ;; 3.18 * )
4.1 --- a/test/tools/javac/api/6440333/T6440333.java Fri Aug 28 16:54:10 2009 -0700 4.2 +++ b/test/tools/javac/api/6440333/T6440333.java Mon Aug 31 12:36:26 2009 -0700 4.3 @@ -26,6 +26,7 @@ 4.4 * @bug 6440333 4.5 * @summary SimpleJavaFileObject.toString() generates URI with some extra message 4.6 * @author Peter von der Ah\u00e9 4.7 + * @ignore 6877223 test ignored because of issues with File.toUri on Windows (6877206) 4.8 * @library ../lib 4.9 * @compile T6440333.java 4.10 * @run main T6440333 4.11 @@ -42,6 +43,10 @@ 4.12 JavaFileObject fo = fm.getJavaFileObjects(src).iterator().next(); 4.13 String expect = src.getCanonicalFile().getPath().replace(File.separatorChar, '/'); 4.14 System.err.println("Expect " + expect); 4.15 + // CURRENTLY, the following line fails on Windows because a file C:/w/jjg/... 4.16 + // returns a URI file://C/w/jjg... which incorrectly encodes the drive letter 4.17 + // in the URI authority. This is against the spec that the authority is 4.18 + // undefined and breaks the contract that new File(f.toURI()).equals(f.getAbsoluteFile()) 4.19 System.err.println("Got: " + fo.toUri().getPath()); 4.20 if (!expect.equals(fo.toUri().getPath())) { 4.21 throw new AssertionError();
5.1 --- a/test/tools/javac/api/Sibling.java Fri Aug 28 16:54:10 2009 -0700 5.2 +++ b/test/tools/javac/api/Sibling.java Mon Aug 31 12:36:26 2009 -0700 5.3 @@ -26,6 +26,7 @@ 5.4 * @bug 6399602 5.5 * @summary Verify that files are created relative to sibling 5.6 * @author Peter von der Ah\u00e9 5.7 + * @ignore 6877223 test ignored because of issues with File.toUri on Windows (6877206) 5.8 */ 5.9 5.10 import java.io.File;
6.1 --- a/test/tools/javac/code/ArrayClone.java Fri Aug 28 16:54:10 2009 -0700 6.2 +++ b/test/tools/javac/code/ArrayClone.java Mon Aug 31 12:36:26 2009 -0700 6.3 @@ -47,7 +47,7 @@ 6.4 String out = sw.toString(); 6.5 System.out.println(out); 6.6 6.7 - for (String line: out.split("\n")) { 6.8 + for (String line: out.split("(\\n|\\r\\n?)")) { 6.9 String match = "[ \t]+[0-9]+:[ \t]+invokevirtual[ \t]+#[0-9]+[ \t]+// Method \"\\[Ljava/lang/String;\".clone:\\(\\)Ljava/lang/Object;"; 6.10 if (line.matches(match)) 6.11 return;
7.1 --- a/test/tools/javac/constDebug/ConstDebug.sh Fri Aug 28 16:54:10 2009 -0700 7.2 +++ b/test/tools/javac/constDebug/ConstDebug.sh Mon Aug 31 12:36:26 2009 -0700 7.3 @@ -48,12 +48,14 @@ 7.4 OS=`uname -s` 7.5 case "$OS" in 7.6 SunOS | Linux ) 7.7 - NULL=/dev/null 7.8 PS=":" 7.9 FS="/" 7.10 ;; 7.11 + CYGWIN* ) 7.12 + PS=";" # Platform PS, not Cygwin PS 7.13 + FS="/" 7.14 + ;; 7.15 Windows* ) 7.16 - NULL=NUL 7.17 PS=";" 7.18 FS="\\" 7.19 ;; 7.20 @@ -69,7 +71,7 @@ 7.21 "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -g -d . -classpath .${PS}${TESTSRC} $1.java 2> ${TMP1} 7.22 result=$? 7.23 if [ $result -ne 0 ]; then exit $result; fi 7.24 -if strings $1.class | grep clinit; then 7.25 +if "${TESTJAVA}${FS}bin${FS}javap" $1.class | grep clinit; then 7.26 echo "Failed" 7.27 exit 1; 7.28 else
8.1 --- a/test/tools/javac/fatalErrors/NoJavaLang.sh Fri Aug 28 16:54:10 2009 -0700 8.2 +++ b/test/tools/javac/fatalErrors/NoJavaLang.sh Mon Aug 31 12:36:26 2009 -0700 8.3 @@ -49,13 +49,13 @@ 8.4 OS=`uname -s` 8.5 case "$OS" in 8.6 SunOS | Linux ) 8.7 - NULL=/dev/null 8.8 - PS=":" 8.9 FS="/" 8.10 ;; 8.11 + CYGWIN* ) 8.12 + FS="/" 8.13 + DIFFOPTS="--strip-trailing-cr" 8.14 + ;; 8.15 Windows* ) 8.16 - NULL=NUL 8.17 - PS=";" 8.18 FS="\\" 8.19 ;; 8.20 * ) 8.21 @@ -98,7 +98,7 @@ 8.22 8.23 # expected message 8.24 cat "${TMP1}" 8.25 -diff -c "${TESTSRC}${FS}NoJavaLang.out" "${TMP1}" 8.26 +diff ${DIFFOPTS} -c "${TESTSRC}${FS}NoJavaLang.out" "${TMP1}" 8.27 result=$? 8.28 rm "${TMP1}" 8.29
9.1 --- a/test/tools/javac/innerClassFile/Driver.sh Fri Aug 28 16:54:10 2009 -0700 9.2 +++ b/test/tools/javac/innerClassFile/Driver.sh Mon Aug 31 12:36:26 2009 -0700 9.3 @@ -23,6 +23,12 @@ 9.4 # have any questions. 9.5 # 9.6 9.7 +# @test 9.8 +# @bug 4491755 4785453 9.9 +# @summary Prob w/static inner class with same name as a regular class 9.10 +# @author gafter 9.11 +# 9.12 +# @run shell Driver.sh 9.13 9.14 if [ "${TESTSRC}" = "" ] 9.15 then 9.16 @@ -47,14 +53,10 @@ 9.17 # set platform-dependent variables 9.18 OS=`uname -s` 9.19 case "$OS" in 9.20 - SunOS | Linux ) 9.21 - NULL=/dev/null 9.22 - PS=":" 9.23 + SunOS | Linux | CYGWIN* ) 9.24 FS="/" 9.25 ;; 9.26 Windows* ) 9.27 - NULL=NUL 9.28 - PS=";" 9.29 FS="\\" 9.30 ;; 9.31 * )
10.1 --- a/test/tools/javac/quid/QuotedIdent.java Fri Aug 28 16:54:10 2009 -0700 10.2 +++ b/test/tools/javac/quid/QuotedIdent.java Mon Aug 31 12:36:26 2009 -0700 10.3 @@ -26,6 +26,9 @@ 10.4 * @bug 6746458 10.5 * @summary Verify correct lexing of quoted identifiers. 10.6 * @author jrose 10.7 + * @ignore 6877225 test fails on Windows: 10.8 + * QuotedIdent.java:81: error while writing QuotedIdent.*86: PATH\QuotedIdent$*86.class 10.9 + * (The filename, directory name, or volume label syntax is incorrect) 10.10 * 10.11 * @library .. 10.12 * @run main quid.QuotedIdent
11.1 --- a/test/tools/javac/quid/QuotedIdent2.java Fri Aug 28 16:54:10 2009 -0700 11.2 +++ b/test/tools/javac/quid/QuotedIdent2.java Mon Aug 31 12:36:26 2009 -0700 11.3 @@ -26,6 +26,9 @@ 11.4 * @bug 6746458 11.5 * @summary Verify correct separate compilation of classes with extended identifiers. 11.6 * @author jrose 11.7 + * @ignore 6877225 test fails on Windows: 11.8 + * QuotedIdent.java:81: error while writing QuotedIdent.*86: PATH\QuotedIdent$*86.class 11.9 + * (The filename, directory name, or volume label syntax is incorrect) 11.10 * 11.11 * @library .. 11.12 * @run main quid.QuotedIdent2
12.1 --- a/test/tools/javac/stackmap/T4955930.sh Fri Aug 28 16:54:10 2009 -0700 12.2 +++ b/test/tools/javac/stackmap/T4955930.sh Mon Aug 31 12:36:26 2009 -0700 12.3 @@ -41,7 +41,7 @@ 12.4 # set platform-dependent variables 12.5 OS=`uname -s` 12.6 case "$OS" in 12.7 - SunOS | Linux ) 12.8 + SunOS | Linux | CYGWIN* ) 12.9 FS="/" 12.10 ;; 12.11 Windows_95 | Windows_98 | Windows_NT )