< prev index next >

test/jdk/tools/jpackage/createimage/JPackageCreateImageInputFilesTest.java

Print this page

        

@@ -34,10 +34,11 @@
  * @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,24 +50,22 @@
     }
 
     private static final String [] CMD_1 = {
         "create-image",
         "--input", "input",
-        "--output", "output",
+        "--output", OUTPUT,
         "--name", "test",
         "--main-jar", "hello.jar",
-        "--overwrite",
         "--main-class", "Hello"};
 
     private static final String [] CMD_2 = {
         "create-image",
         "--input", "input",
-        "--output", "output",
+        "--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()) {

@@ -97,18 +96,21 @@
 
     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 >