103
104 private static void init(String name, String ext) {
105 TEST_NAME = name;
106 DEP_NAME = name + "Dep";
107 EXT = ext;
108 if (EXT.equals("rpm")) {
109 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
110 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0-1.x86_64." + EXT;
111 } else {
112 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
113 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0." + EXT;
114 }
115 CMD = new String[]{
116 "create-installer",
117 "--installer-type", EXT,
118 "--input", "input",
119 "--output", "output",
120 "--name", TEST_NAME,
121 "--main-jar", "hello.jar",
122 "--main-class", "Hello",
123 "--files", "hello.jar",
124 "--linux-package-deps", DEP_NAME.toLowerCase()};
125 CMD_DEP = new String[]{
126 "create-installer",
127 "--installer-type", EXT,
128 "--input", "input",
129 "--output", "output",
130 "--name", DEP_NAME,
131 "--main-jar", "hello.jar",
132 "--main-class", "Hello",
133 "--files", "hello.jar"};
134 }
135
136 public static void run(String name, String ext) throws Exception {
137 init(name, ext);
138
139 if (JPackageInstallerHelper.isVerifyInstall()) {
140 verifyInstall();
141 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
142 verifyUnInstall();
143 } else {
144 JPackageHelper.createHelloInstallerJar();
145 testCreateInstaller();
146 }
147 }
148 }
|
103
104 private static void init(String name, String ext) {
105 TEST_NAME = name;
106 DEP_NAME = name + "Dep";
107 EXT = ext;
108 if (EXT.equals("rpm")) {
109 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
110 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0-1.x86_64." + EXT;
111 } else {
112 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
113 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0." + EXT;
114 }
115 CMD = new String[]{
116 "create-installer",
117 "--installer-type", EXT,
118 "--input", "input",
119 "--output", "output",
120 "--name", TEST_NAME,
121 "--main-jar", "hello.jar",
122 "--main-class", "Hello",
123 "--linux-package-deps", DEP_NAME.toLowerCase()};
124 CMD_DEP = new String[]{
125 "create-installer",
126 "--installer-type", EXT,
127 "--input", "input",
128 "--output", "output",
129 "--name", DEP_NAME,
130 "--main-jar", "hello.jar",
131 "--main-class", "Hello"};
132 }
133
134 public static void run(String name, String ext) throws Exception {
135 init(name, ext);
136
137 if (JPackageInstallerHelper.isVerifyInstall()) {
138 verifyInstall();
139 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
140 verifyUnInstall();
141 } else {
142 JPackageHelper.createHelloInstallerJar();
143 testCreateInstaller();
144 }
145 }
146 }
|