52 import jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin;
53
54 import tests.Helper;
55 import tests.JImageGenerator;
56
57 /*
58 * @test
59 * @summary Test integration API
60 * @author Jean-Francois Denise
61 * @library ../lib
62 * @modules java.base/jdk.internal.jimage
63 * jdk.jdeps/com.sun.tools.classfile
64 * jdk.jlink/jdk.tools.jlink.builder
65 * jdk.jlink/jdk.tools.jlink.internal
66 * jdk.jlink/jdk.tools.jlink.internal.plugins
67 * jdk.jlink/jdk.tools.jlink.plugin
68 * jdk.jlink/jdk.tools.jmod
69 * jdk.jlink/jdk.tools.jimage
70 * jdk.compiler
71 * @build tests.*
72 * @run main IntegrationTest
73 */
74 public class IntegrationTest {
75
76 private static final List<Integer> ordered = new ArrayList<>();
77
78 public static class MyPostProcessor implements PostProcessor, Plugin {
79
80 public static final String NAME = "mypostprocessor";
81
82 @Override
83 public List<String> process(ExecutableImage image) {
84 try {
85 Files.createFile(image.getHome().resolve("toto.txt"));
86 return null;
87 } catch (IOException ex) {
88 throw new UncheckedIOException(ex);
89 }
90 }
91
92 @Override
|
52 import jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin;
53
54 import tests.Helper;
55 import tests.JImageGenerator;
56
57 /*
58 * @test
59 * @summary Test integration API
60 * @author Jean-Francois Denise
61 * @library ../lib
62 * @modules java.base/jdk.internal.jimage
63 * jdk.jdeps/com.sun.tools.classfile
64 * jdk.jlink/jdk.tools.jlink.builder
65 * jdk.jlink/jdk.tools.jlink.internal
66 * jdk.jlink/jdk.tools.jlink.internal.plugins
67 * jdk.jlink/jdk.tools.jlink.plugin
68 * jdk.jlink/jdk.tools.jmod
69 * jdk.jlink/jdk.tools.jimage
70 * jdk.compiler
71 * @build tests.*
72 * @run main/othervm -Xmx1g IntegrationTest
73 */
74 public class IntegrationTest {
75
76 private static final List<Integer> ordered = new ArrayList<>();
77
78 public static class MyPostProcessor implements PostProcessor, Plugin {
79
80 public static final String NAME = "mypostprocessor";
81
82 @Override
83 public List<String> process(ExecutableImage image) {
84 try {
85 Files.createFile(image.getHome().resolve("toto.txt"));
86 return null;
87 } catch (IOException ex) {
88 throw new UncheckedIOException(ex);
89 }
90 }
91
92 @Override
|