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 }
|
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 "--linux-bundle-name", BUNDLE_NAME};
79 }
80
81 public static void run(String name, String ext) throws Exception {
82 init(name, ext);
83
84 if (JPackageInstallerHelper.isVerifyInstall()) {
85 verifyInstall();
86 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
87 verifyUnInstall();
88 } else {
89 JPackageHelper.createHelloInstallerJar();
90 testCreateInstaller();
91 }
92 }
93 }
|