equal
deleted
inserted
replaced
56 tb.writeJavaFiles(m1, |
56 tb.writeJavaFiles(m1, |
57 "module m1 {}", |
57 "module m1 {}", |
58 "package test; public class Test {}"); |
58 "package test; public class Test {}"); |
59 |
59 |
60 new JavacTask(tb) |
60 new JavacTask(tb) |
61 .options("-m", "m1", "-modulesourcepath", src.toString(), "-d", build.toString()) |
61 .options("-m", "m1", "--module-source-path", src.toString(), "-d", build.toString()) |
62 .run(Task.Expect.SUCCESS) |
62 .run(Task.Expect.SUCCESS) |
63 .writeAll(); |
63 .writeAll(); |
64 |
64 |
65 Path moduleInfoClass = build.resolve("m1/module-info.class"); |
65 Path moduleInfoClass = build.resolve("m1/module-info.class"); |
66 Path testTestClass = build.resolve("m1/test/Test.class"); |
66 Path testTestClass = build.resolve("m1/test/Test.class"); |
79 } |
79 } |
80 |
80 |
81 Thread.sleep(2000); //timestamps |
81 Thread.sleep(2000); //timestamps |
82 |
82 |
83 new JavacTask(tb) |
83 new JavacTask(tb) |
84 .options("-m", "m1", "-modulesourcepath", src.toString(), "-d", build.toString()) |
84 .options("-m", "m1", "--module-source-path", src.toString(), "-d", build.toString()) |
85 .run(Task.Expect.SUCCESS) |
85 .run(Task.Expect.SUCCESS) |
86 .writeAll(); |
86 .writeAll(); |
87 |
87 |
88 if (!moduleInfoTimeStamp.equals(Files.getLastModifiedTime(moduleInfoClass))) { |
88 if (!moduleInfoTimeStamp.equals(Files.getLastModifiedTime(moduleInfoClass))) { |
89 throw new AssertionError("Classfile update!"); |
89 throw new AssertionError("Classfile update!"); |
96 Thread.sleep(2000); //timestamps |
96 Thread.sleep(2000); //timestamps |
97 |
97 |
98 Files.setLastModifiedTime(testTest, FileTime.fromMillis(System.currentTimeMillis())); |
98 Files.setLastModifiedTime(testTest, FileTime.fromMillis(System.currentTimeMillis())); |
99 |
99 |
100 new JavacTask(tb) |
100 new JavacTask(tb) |
101 .options("-m", "m1", "-modulesourcepath", src.toString(), "-d", build.toString()) |
101 .options("-m", "m1", "--module-source-path", src.toString(), "-d", build.toString()) |
102 .run(Task.Expect.SUCCESS) |
102 .run(Task.Expect.SUCCESS) |
103 .writeAll(); |
103 .writeAll(); |
104 |
104 |
105 if (!moduleInfoTimeStamp.equals(Files.getLastModifiedTime(moduleInfoClass))) { |
105 if (!moduleInfoTimeStamp.equals(Files.getLastModifiedTime(moduleInfoClass))) { |
106 throw new AssertionError("Classfile update!"); |
106 throw new AssertionError("Classfile update!"); |
123 "package test; public class Test {}"); |
123 "package test; public class Test {}"); |
124 |
124 |
125 String log = new JavacTask(tb) |
125 String log = new JavacTask(tb) |
126 .options("-XDrawDiagnostics", |
126 .options("-XDrawDiagnostics", |
127 "-m", "m1", |
127 "-m", "m1", |
128 "-modulesourcepath", src.toString()) |
128 "--module-source-path", src.toString()) |
129 .run(Task.Expect.FAIL) |
129 .run(Task.Expect.FAIL) |
130 .writeAll() |
130 .writeAll() |
131 .getOutput(Task.OutputKind.DIRECT); |
131 .getOutput(Task.OutputKind.DIRECT); |
132 |
132 |
133 if (!log.contains("- compiler.err.output.dir.must.be.specified.with.dash.m.option")) |
133 if (!log.contains("- compiler.err.output.dir.must.be.specified.with.dash.m.option")) |
172 tb.writeJavaFiles(m2, |
172 tb.writeJavaFiles(m2, |
173 "module m2 {}", |
173 "module m2 {}", |
174 "package p2; public class C2 {}"); |
174 "package p2; public class C2 {}"); |
175 |
175 |
176 new JavacTask(tb) |
176 new JavacTask(tb) |
177 .options("-m", "m1,m2", "-modulesourcepath", src.toString(), "-d", build.toString()) |
177 .options("-m", "m1,m2", "--module-source-path", src.toString(), "-d", build.toString()) |
178 .run(Task.Expect.SUCCESS) |
178 .run(Task.Expect.SUCCESS) |
179 .writeAll(); |
179 .writeAll(); |
180 |
180 |
181 Path m1ModuleInfoClass = build.resolve("m1/module-info.class"); |
181 Path m1ModuleInfoClass = build.resolve("m1/module-info.class"); |
182 Path classC1 = build.resolve("m1/p1/C1.class"); |
182 Path classC1 = build.resolve("m1/p1/C1.class"); |
213 } |
213 } |
214 |
214 |
215 Thread.sleep(2000); //timestamps |
215 Thread.sleep(2000); //timestamps |
216 |
216 |
217 new JavacTask(tb) |
217 new JavacTask(tb) |
218 .options("-m", "m1,m2", "-modulesourcepath", src.toString(), "-d", build.toString()) |
218 .options("-m", "m1,m2", "--module-source-path", src.toString(), "-d", build.toString()) |
219 .run(Task.Expect.SUCCESS) |
219 .run(Task.Expect.SUCCESS) |
220 .writeAll(); |
220 .writeAll(); |
221 |
221 |
222 if (!m1ModuleInfoTimeStamp.equals(Files.getLastModifiedTime(m1ModuleInfoClass))) { |
222 if (!m1ModuleInfoTimeStamp.equals(Files.getLastModifiedTime(m1ModuleInfoClass))) { |
223 throw new AssertionError("Classfile update!"); |
223 throw new AssertionError("Classfile update!"); |
239 |
239 |
240 Files.setLastModifiedTime(C1Source, FileTime.fromMillis(System.currentTimeMillis())); |
240 Files.setLastModifiedTime(C1Source, FileTime.fromMillis(System.currentTimeMillis())); |
241 Files.setLastModifiedTime(C2Source, FileTime.fromMillis(System.currentTimeMillis())); |
241 Files.setLastModifiedTime(C2Source, FileTime.fromMillis(System.currentTimeMillis())); |
242 |
242 |
243 new JavacTask(tb) |
243 new JavacTask(tb) |
244 .options("-m", "m1,m2", "-modulesourcepath", src.toString(), "-d", build.toString()) |
244 .options("-m", "m1,m2", "--module-source-path", src.toString(), "-d", build.toString()) |
245 .run(Task.Expect.SUCCESS) |
245 .run(Task.Expect.SUCCESS) |
246 .writeAll(); |
246 .writeAll(); |
247 |
247 |
248 if (!m1ModuleInfoTimeStamp.equals(Files.getLastModifiedTime(m1ModuleInfoClass))) { |
248 if (!m1ModuleInfoTimeStamp.equals(Files.getLastModifiedTime(m1ModuleInfoClass))) { |
249 throw new AssertionError("Classfile update!"); |
249 throw new AssertionError("Classfile update!"); |