equal
deleted
inserted
replaced
30 * @modules java.base/jdk.internal.misc |
30 * @modules java.base/jdk.internal.misc |
31 * java.management |
31 * java.management |
32 * @run main LongBCP |
32 * @run main LongBCP |
33 */ |
33 */ |
34 |
34 |
|
35 import java.io.File; |
|
36 import java.nio.file.Files; |
|
37 import java.nio.file.FileStore; |
35 import java.nio.file.Path; |
38 import java.nio.file.Path; |
36 import java.nio.file.Paths; |
39 import java.nio.file.Paths; |
37 import java.util.Arrays; |
40 import java.util.Arrays; |
38 import jdk.test.lib.Platform; |
41 import jdk.test.lib.Platform; |
39 import jdk.test.lib.compiler.CompilerUtils; |
42 import jdk.test.lib.compiler.CompilerUtils; |
83 |
86 |
84 // relative path tests |
87 // relative path tests |
85 // We currently cannot handle relative path specified in the |
88 // We currently cannot handle relative path specified in the |
86 // -Xbootclasspath/a on windows. |
89 // -Xbootclasspath/a on windows. |
87 // |
90 // |
88 // relative path length within the 256 limit |
91 // relative path length within the file system limit |
89 char[] chars = new char[255]; |
92 int fn_max_length = 255; |
|
93 // In AUFS file system, the maximal file name length is 242 |
|
94 FileStore store = Files.getFileStore(new File(".").toPath()); |
|
95 String fs_type = store.type(); |
|
96 if ("aufs".equals(fs_type)) { |
|
97 fn_max_length = 242; |
|
98 } |
|
99 char[] chars = new char[fn_max_length]; |
90 Arrays.fill(chars, 'y'); |
100 Arrays.fill(chars, 'y'); |
91 String subPath = new String(chars); |
101 String subPath = new String(chars); |
92 destDir = Paths.get(".", subPath); |
102 destDir = Paths.get(".", subPath); |
93 |
103 |
94 CompilerUtils.compile(sourceDir, destDir); |
104 CompilerUtils.compile(sourceDir, destDir); |