author | ssadetsky |
Fri, 14 Jun 2019 11:16:11 -0700 | |
branch | JDK-8200758-branch |
changeset 57406 | 0748948fcf26 |
child 57414 | 6eda749d3117 |
permissions | -rw-r--r-- |
57406
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
1 |
/* |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
4 |
* |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
8 |
* |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
13 |
* accompanied this code). |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
14 |
* |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
18 |
* |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
21 |
* questions. |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
22 |
*/ |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
23 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
24 |
import javax.xml.stream.XMLInputFactory; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
25 |
import javax.xml.stream.XMLStreamConstants; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
26 |
import javax.xml.stream.XMLStreamReader; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
27 |
import java.io.BufferedReader; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
28 |
import java.io.File; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
29 |
import java.io.FileInputStream; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
30 |
import java.io.FileReader; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
31 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
32 |
public class JPackageCreateInstallerMacOptionsBase { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
33 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
34 |
static final String TEST_BUNDLE_NAME = "TestBundleName"; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
35 |
static final String TEST_BUNDLE_IDENTIFIER = "net.java.openjdk.packagerTest"; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
36 |
static final String TEST_CATECORY = "public.app-category.test"; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
37 |
private static String TEST_NAME; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
38 |
private static String EXT; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
39 |
private static String OUTPUT; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
40 |
private static String[] CMD; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
41 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
42 |
private static void testCreateInstaller() throws Exception { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
43 |
JPackageHelper.executeCLI(true, CMD); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
44 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
45 |
if (EXT.equals("dmg")) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
46 |
String disk = null; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
47 |
try { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
48 |
var log = new File("hdiutil.log"); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
49 |
JPackageHelper.execute(log, "/usr/bin/hdiutil", |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
50 |
"attach", OUTPUT); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
51 |
try(var br = new BufferedReader(new FileReader(log))) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
52 |
var line = br.lines().reduce((a, b) -> b).orElse(null) |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
53 |
.split("\t"); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
54 |
disk = line[0].trim(); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
55 |
testPkg(line[2].trim() + File.separator + TEST_NAME + |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
56 |
"-1.0.pkg"); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
57 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
58 |
} finally { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
59 |
if (disk != null) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
60 |
JPackageHelper.execute(null, |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
61 |
"/usr/bin/hdiutil", "detach", disk); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
62 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
63 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
64 |
} else { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
65 |
testPkg(OUTPUT); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
66 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
67 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
68 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
69 |
private static void testPkg(String path) throws Exception { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
70 |
JPackageHelper.execute(null, "/usr/sbin/pkgutil", |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
71 |
"--expand-full", path, "expand"); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
72 |
var info = new File("expand/" + TEST_NAME + "-app.pkg/Payload/" |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
73 |
+ TEST_NAME + ".app/Contents/Info.plist"); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
74 |
if (!info.exists()) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
75 |
throw new AssertionError("Info.plist not found"); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
76 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
77 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
78 |
String bundleName = null; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
79 |
String bundleIdentifier = null; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
80 |
String categoryType = null; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
81 |
try (FileInputStream fis = new FileInputStream(info)) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
82 |
var xmlInFact = XMLInputFactory.newInstance(); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
83 |
xmlInFact.setProperty(XMLInputFactory.SUPPORT_DTD, false); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
84 |
xmlInFact.setProperty( |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
85 |
XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
86 |
var reader = xmlInFact.createXMLStreamReader(fis); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
87 |
while (reader.hasNext()) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
88 |
if (reader.next() == XMLStreamConstants.CHARACTERS) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
89 |
switch (reader.getText()) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
90 |
case "CFBundleName": { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
91 |
bundleName = readValue(reader); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
92 |
break; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
93 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
94 |
case "CFBundleIdentifier" : { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
95 |
bundleIdentifier = readValue(reader); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
96 |
break; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
97 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
98 |
case "LSApplicationCategoryType" : { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
99 |
categoryType = readValue(reader); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
100 |
break; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
101 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
102 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
103 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
104 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
105 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
106 |
boolean passed = true; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
107 |
if (!TEST_BUNDLE_NAME.equals(bundleName)) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
108 |
passed = false; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
109 |
System.err.println("Wrong bundle name [" + bundleName + |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
110 |
"] expected [" + TEST_BUNDLE_NAME + "]" ); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
111 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
112 |
if (!TEST_BUNDLE_IDENTIFIER.equals(bundleIdentifier)) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
113 |
passed = false; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
114 |
System.err.println("Wrong bundle identifier [" + |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
115 |
bundleIdentifier + "] expected [" + TEST_BUNDLE_IDENTIFIER |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
116 |
+ "]" ); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
117 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
118 |
if (!TEST_CATECORY.equals(categoryType)) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
119 |
passed = false; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
120 |
System.err.println("Wrong appstore category [" + categoryType + |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
121 |
"] expected [" + TEST_CATECORY + "]" ); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
122 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
123 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
124 |
if (!passed) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
125 |
throw new AssertionError("Test failed"); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
126 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
127 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
128 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
129 |
static private String readValue(XMLStreamReader reader) throws Exception { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
130 |
while (reader.hasNext() && reader.next() != XMLStreamConstants.START_ELEMENT); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
131 |
return reader.hasNext() ? reader.getElementText() : null; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
132 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
133 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
134 |
private static void verifyInstall() throws Exception { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
135 |
String app = JPackagePath.getOSXInstalledApp("jpackage", TEST_NAME); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
136 |
JPackageInstallerHelper.validateApp(app); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
137 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
138 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
139 |
private static void verifyUnInstall() throws Exception { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
140 |
// Not needed on OS X, since we just deleting installed application |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
141 |
// without using generated installer. We keeping this for consistnency |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
142 |
// between platforms. |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
143 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
144 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
145 |
private static void init(String name, String ext) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
146 |
TEST_NAME = name; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
147 |
EXT = ext; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
148 |
OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
149 |
CMD = new String[] { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
150 |
"create-installer", |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
151 |
"--installer-type", EXT, |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
152 |
"--input", "input", |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
153 |
"--output", "output", |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
154 |
"--name", TEST_NAME, |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
155 |
"--main-jar", "hello.jar", |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
156 |
"--main-class", "Hello", |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
157 |
"--mac-bundle-name", TEST_BUNDLE_NAME, |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
158 |
"--mac-bundle-identifier", TEST_BUNDLE_IDENTIFIER, |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
159 |
"--mac-app-store-category", TEST_CATECORY |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
160 |
}; |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
161 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
162 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
163 |
public static void run(String name, String ext) throws Exception { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
164 |
init(name, ext); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
165 |
|
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
166 |
if (JPackageInstallerHelper.isVerifyInstall()) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
167 |
verifyInstall(); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
168 |
} else if (JPackageInstallerHelper.isVerifyUnInstall()) { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
169 |
verifyUnInstall(); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
170 |
} else { |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
171 |
JPackageHelper.createHelloInstallerJar(); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
172 |
testCreateInstaller(); |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
173 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
174 |
} |
0748948fcf26
8223402: Create tests for some Mac installer specific options
ssadetsky
parents:
diff
changeset
|
175 |
} |