< prev index next >

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

Print this page




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


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

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