35 import java.util.function.Consumer;
36 import java.util.stream.Stream;
37
38 import tests.Helper;
39 import tests.JImageGenerator;
40 import tests.JImageValidator;
41
42 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
43
44 /*
45 * jimage testing.
46 * @test
47 * @summary Test jimage tool
48 * @library ../lib
49 * @modules java.base/jdk.internal.jimage
50 * jdk.jdeps/com.sun.tools.classfile
51 * jdk.jlink/jdk.tools.jmod
52 * jdk.jlink/jdk.tools.jlink
53 * jdk.jlink/jdk.tools.jimage
54 * jdk.jlink/jdk.tools.jlink.internal
55 * @run build JImageTest
56 * @run build tests.*
57 * @run main/othervm -verbose:gc -Xmx1g JImageTest
58 */
59 public class JImageTest {
60
61 public static void main(String[] args) throws Exception {
62 List<String> bootClasses = new ArrayList<>();
63
64 FileSystem fs;
65 try {
66 fs = FileSystems.getFileSystem(URI.create("jrt:/"));
67 } catch (ProviderNotFoundException | FileSystemNotFoundException e) {
68 System.out.println("Not an image build, test skipped.");
69 return;
70 }
71
72 // Build the set of locations expected in the Image
73 Consumer<Path> c = (p) -> {
74 // take only the .class resources.
|
35 import java.util.function.Consumer;
36 import java.util.stream.Stream;
37
38 import tests.Helper;
39 import tests.JImageGenerator;
40 import tests.JImageValidator;
41
42 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
43
44 /*
45 * jimage testing.
46 * @test
47 * @summary Test jimage tool
48 * @library ../lib
49 * @modules java.base/jdk.internal.jimage
50 * jdk.jdeps/com.sun.tools.classfile
51 * jdk.jlink/jdk.tools.jmod
52 * jdk.jlink/jdk.tools.jlink
53 * jdk.jlink/jdk.tools.jimage
54 * jdk.jlink/jdk.tools.jlink.internal
55 * jdk.compiler
56 * @run build JImageTest
57 * @run build tests.*
58 * @run main/othervm -verbose:gc -Xmx1g JImageTest
59 */
60 public class JImageTest {
61
62 public static void main(String[] args) throws Exception {
63 List<String> bootClasses = new ArrayList<>();
64
65 FileSystem fs;
66 try {
67 fs = FileSystems.getFileSystem(URI.create("jrt:/"));
68 } catch (ProviderNotFoundException | FileSystemNotFoundException e) {
69 System.out.println("Not an image build, test skipped.");
70 return;
71 }
72
73 // Build the set of locations expected in the Image
74 Consumer<Path> c = (p) -> {
75 // take only the .class resources.
|