< prev index next >
test/jdk/tools/jpackage/createimage/JPackageCreateImageInputFilesTest.java
Print this page
*** 34,43 ****
--- 34,44 ----
* @build JPackagePath
* @modules jdk.jpackage
* @run main/othervm -Xmx512m JPackageCreateImageInputFilesTest
*/
public class JPackageCreateImageInputFilesTest {
+ private static final String OUTPUT = "output";
private static final String inputFile =
"input" + File.separator + "input.txt";
private static final String jarFile =
"input" + File.separator + "hello.jar";
private static final String appInputFilePath;
*** 49,72 ****
}
private static final String [] CMD_1 = {
"create-image",
"--input", "input",
! "--output", "output",
"--name", "test",
"--main-jar", "hello.jar",
- "--overwrite",
"--main-class", "Hello"};
private static final String [] CMD_2 = {
"create-image",
"--input", "input",
! "--output", "output",
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
- "--overwrite",
"--files", "hello.jar"};
private static void validate1() throws Exception {
File input = new File(appInputFilePath);
if (!input.exists()) {
--- 50,71 ----
}
private static final String [] CMD_1 = {
"create-image",
"--input", "input",
! "--output", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello"};
private static final String [] CMD_2 = {
"create-image",
"--input", "input",
! "--output", OUTPUT,
"--name", "test",
"--main-jar", "hello.jar",
"--main-class", "Hello",
"--files", "hello.jar"};
private static void validate1() throws Exception {
File input = new File(appInputFilePath);
if (!input.exists()) {
*** 97,114 ****
--- 96,116 ----
private static void testCreateImage() throws Exception {
JPackageHelper.executeCLI(true, CMD_1);
validate1();
+ JPackageHelper.deleteOutputFolder(OUTPUT);
JPackageHelper.executeCLI(true, CMD_2);
validate2();
}
private static void testCreateImageToolProvider() throws Exception {
+ JPackageHelper.deleteOutputFolder(OUTPUT);
JPackageHelper.executeToolProvider(true, CMD_1);
validate1();
+ JPackageHelper.deleteOutputFolder(OUTPUT);
JPackageHelper.executeToolProvider(true, CMD_2);
validate2();
}
private static void createInputFile() throws Exception {
< prev index next >