11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8170859
27 * @summary Basic test for incubator modules in jmods and images
28 * @library /lib/testlibrary /test/lib
29 * @key intermittent
30 * @modules jdk.compiler jdk.jartool jdk.jlink
31 * @build CompilerUtils
32 * @run testng/othervm ImageModules
33 */
34
35 import java.io.ByteArrayOutputStream;
36 import java.io.File;
37 import java.io.IOException;
38 import java.io.PrintStream;
39 import java.nio.file.Files;
40 import java.nio.file.Path;
41 import java.nio.file.Paths;
42 import java.util.List;
43 import java.util.function.Consumer;
44 import java.util.spi.ToolProvider;
45 import java.util.stream.Collectors;
46 import java.util.stream.Stream;
47
48 import jdk.test.lib.util.FileUtils;
49 import org.testng.annotations.BeforeTest;
50 import org.testng.annotations.DataProvider;
51 import org.testng.annotations.Test;
52
53 import static java.nio.charset.StandardCharsets.UTF_8;
54 import static jdk.testlibrary.ProcessTools.executeCommand;
55 import static org.testng.Assert.*;
56
57 public class ImageModules {
58 private static final String JAVA_HOME = System.getProperty("java.home");
59 private static final Path JDK_JMODS = Paths.get(JAVA_HOME, "jmods");
60
61 private static final Path TEST_SRC = Paths.get(System.getProperty("test.src"));
62 private static final Path MODS_DIR = Paths.get("mods");
63 private static final Path CP_DIR = Paths.get("cp");
64 private static final Path JARS_DIR = Paths.get("jars");
65 private static final Path JMODS_DIR = Paths.get("jmods");
66 private static final Path IMAGE = Paths.get("image");
67
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8170859
27 * @summary Basic test for incubator modules in jmods and images
28 * @library /lib/testlibrary /test/lib
29 * @key intermittent
30 * @modules jdk.compiler jdk.jartool jdk.jlink
31 * @build jdk.test.lib.compiler.CompilerUtils
32 * @run testng/othervm ImageModules
33 */
34
35 import java.io.ByteArrayOutputStream;
36 import java.io.File;
37 import java.io.IOException;
38 import java.io.PrintStream;
39 import java.nio.file.Files;
40 import java.nio.file.Path;
41 import java.nio.file.Paths;
42 import java.util.List;
43 import java.util.function.Consumer;
44 import java.util.spi.ToolProvider;
45 import java.util.stream.Collectors;
46 import java.util.stream.Stream;
47
48 import jdk.test.lib.compiler.CompilerUtils;
49 import jdk.test.lib.util.FileUtils;
50 import org.testng.annotations.BeforeTest;
51 import org.testng.annotations.DataProvider;
52 import org.testng.annotations.Test;
53
54 import static java.nio.charset.StandardCharsets.UTF_8;
55 import static jdk.testlibrary.ProcessTools.executeCommand;
56 import static org.testng.Assert.*;
57
58 public class ImageModules {
59 private static final String JAVA_HOME = System.getProperty("java.home");
60 private static final Path JDK_JMODS = Paths.get(JAVA_HOME, "jmods");
61
62 private static final Path TEST_SRC = Paths.get(System.getProperty("test.src"));
63 private static final Path MODS_DIR = Paths.get("mods");
64 private static final Path CP_DIR = Paths.get("cp");
65 private static final Path JARS_DIR = Paths.get("jars");
66 private static final Path JMODS_DIR = Paths.get("jmods");
67 private static final Path IMAGE = Paths.get("image");
68
|