< prev index next >

test/jdk/tools/jpackage/createinstaller/linux/base/JPackageCreateInstallerBase.java

Print this page




  56             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  57         }
  58     }
  59 
  60     private static void init(String name, String ext) {
  61         TEST_NAME = name;
  62         EXT = ext;
  63         if (EXT.equals("rpm")) {
  64             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
  65         } else {
  66             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  67         }
  68         CMD = new String[]{
  69             "create-installer",
  70             "--installer-type", EXT,
  71             "--input", "input",
  72             "--output", "output",
  73             "--name", TEST_NAME,
  74             "--main-jar", "hello.jar",
  75             "--main-class", "Hello",
  76             "--overwrite",
  77             "--files", "hello.jar"};
  78     }
  79 
  80     public static void run(String name, String ext) throws Exception {
  81         init(name, ext);
  82 
  83         if (JPackageInstallerHelper.isVerifyInstall()) {
  84             verifyInstall();
  85         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  86             verifyUnInstall();
  87         } else {
  88             JPackageHelper.createHelloInstallerJar();
  89             testCreateInstaller();
  90         }
  91     }
  92 }


  56             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  57         }
  58     }
  59 
  60     private static void init(String name, String ext) {
  61         TEST_NAME = name;
  62         EXT = ext;
  63         if (EXT.equals("rpm")) {
  64             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
  65         } else {
  66             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  67         }
  68         CMD = new String[]{
  69             "create-installer",
  70             "--installer-type", EXT,
  71             "--input", "input",
  72             "--output", "output",
  73             "--name", TEST_NAME,
  74             "--main-jar", "hello.jar",
  75             "--main-class", "Hello",

  76             "--files", "hello.jar"};
  77     }
  78 
  79     public static void run(String name, String ext) throws Exception {
  80         init(name, ext);
  81 
  82         if (JPackageInstallerHelper.isVerifyInstall()) {
  83             verifyInstall();
  84         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  85             verifyUnInstall();
  86         } else {
  87             JPackageHelper.createHelloInstallerJar();
  88             testCreateInstaller();
  89         }
  90     }
  91 }
< prev index next >