# HG changeset patch # User jjg # Date 1263248221 28800 # Node ID 14a4c45ef7344edf70d17c29237b80367312d2fb # Parent ca6bc36b230588607a989c34427703641a8c60ab 6915497: test test/tools/javac/nio/compileTest/CompileTest.java fails under Hudson Reviewed-by: darcy diff -r ca6bc36b2305 -r 14a4c45ef734 test/tools/javac/nio/compileTest/CompileTest.java --- a/test/tools/javac/nio/compileTest/CompileTest.java Mon Jan 11 14:12:10 2010 -0800 +++ b/test/tools/javac/nio/compileTest/CompileTest.java Mon Jan 11 14:17:01 2010 -0800 @@ -23,9 +23,9 @@ /** * @test - * @bug 6906175 6915476 + * @bug 6906175 6915476 6915497 * @summary Path-based JavaFileManager - * @compile HelloPathWorld.java + * @compile -g HelloPathWorld.java * @run main CompileTest */ @@ -94,7 +94,8 @@ options.addAll(Arrays.asList(opts)); options.addAll(Arrays.asList( "-verbose", "-XDverboseCompilePolicy", - "-d", classes.toString() + "-d", classes.toString(), + "-g" )); Iterable compilationUnits = fm.getJavaFileObjects(testSrcDir.resolve(className + ".java")); @@ -111,6 +112,8 @@ File expect = new File("classes." + count + "/" + className + ".class"); if (!expect.exists()) throw new Exception("expected file not found: " + expect); + // Note that we explicitly specify -g for compiling both the actual class and the expected class. + // This isolates the expected class from javac options that might be given to jtreg. long expectedSize = new File(testClassesDir.toString(), className + ".class").length(); long actualSize = expect.length(); if (expectedSize != actualSize)