Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2015-03-03 15:07:07 +0000
committerPascal Rapicault2015-03-04 17:09:46 +0000
commit1b96ce896c49151b0e20fa49ba680d08415cca8f (patch)
treec7e1ac5374f0b10a82cc8d8ba057d957f91811b8 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions
parent66c9297a230aeb57eb49d07f77eebf9c68d5b9ad (diff)
downloadrt.equinox.p2-1b96ce896c49151b0e20fa49ba680d08415cca8f.tar.gz
rt.equinox.p2-1b96ce896c49151b0e20fa49ba680d08415cca8f.tar.xz
rt.equinox.p2-1b96ce896c49151b0e20fa49ba680d08415cca8f.zip
Bug 431116 - Releases for Mac OS X should be bundled as a proper "Mac
App" and/or "Library" Change-Id: I2bdcc86960361f8268964b4e95bf0eb960dc3cd6 Signed-off-by: Pascal Rapicault <pascal@rapicorp.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java29
1 files changed, 8 insertions, 21 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
index 3f42f4fb7..37101f8df 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
@@ -40,7 +40,6 @@ public class EquinoxExecutableActionTest extends ActionTest {
private static final File WIN_EXEC = new File(TestActivator.getTestDataFolder(), "EquinoxExecutableActionTest/win/"); //$NON-NLS-1$
private final String EXECUTABLE_NAME = "LauncherName"; //$NON-NLS-1$
private Collection<IBrandingAdvice> brandingAdvice = new LinkedList<IBrandingAdvice>();
- private String macConfig = "carbon.macosx.ppc"; //$NON-NLS-1$
private String macConfigCocoa = "cocoa.macosx.x86"; //$NON-NLS-1$
private String winConfig = "win32.win32.x86"; //$NON-NLS-1$
private String linuxConfig = "linux.gtk.x86"; //$NON-NLS-1$
@@ -59,19 +58,11 @@ public class EquinoxExecutableActionTest extends ActionTest {
artifactRepository = new TestArtifactRepository(getAgent());
}
- public void testMacCarbon() throws Exception {
- File icon = File.createTempFile(EXECUTABLE_NAME, ".icns");
- FileUtils.copyStream(new FileInputStream(new File(MAC_EXEC, "eclipse.app/Contents/Resources/eclipse.icns")), true, new FileOutputStream(icon), true);
-
- expectedExecutablesContents = new String[] {EXECUTABLE_NAME + ".app", EXECUTABLE_NAME + ".app/Contents/Info.plist", EXECUTABLE_NAME + ".app/Contents/MacOS/" + EXECUTABLE_NAME, EXECUTABLE_NAME + ".app/Contents/MacOS/" + EXECUTABLE_NAME + ".ini", EXECUTABLE_NAME + ".app/Contents/Resources/" + icon.getName()};
- testExecutableAction("mac", "macosx", macConfig, MAC_EXEC, icon); //$NON-NLS-1$//$NON-NLS-2$
- }
-
public void testMacCocoa() throws Exception {
File icon = File.createTempFile(EXECUTABLE_NAME, ".icns");
FileUtils.copyStream(new FileInputStream(new File(MAC_EXEC, "eclipse.app/Contents/Resources/eclipse.icns")), true, new FileOutputStream(icon), true);
- expectedExecutablesContents = new String[] {EXECUTABLE_NAME + ".app", EXECUTABLE_NAME + ".app/Contents/Info.plist", EXECUTABLE_NAME + ".app/Contents/MacOS/" + EXECUTABLE_NAME, EXECUTABLE_NAME + ".app/Contents/MacOS/" + EXECUTABLE_NAME + ".ini", EXECUTABLE_NAME + ".app/Contents/Resources/" + icon.getName()};
+ expectedExecutablesContents = new String[] {"Info.plist", "MacOS/" + EXECUTABLE_NAME, "MacOS/" + EXECUTABLE_NAME + ".ini", "Resources/" + icon.getName()};
testExecutableAction("macCocoa", "macosx", macConfigCocoa, MAC_EXEC, icon); //$NON-NLS-1$//$NON-NLS-2$
}
@@ -104,13 +95,10 @@ public class EquinoxExecutableActionTest extends ActionTest {
private void verifyResults(String idBase, String confSpec) {
ArrayList iuList = new ArrayList(publisherResult.getIUs(null, IPublisherResult.ROOT));
- verifyExecIU(iuList, idBase, confSpec);
verifyEclipseIU(iuList, idBase, confSpec);
verifyCU(iuList, idBase, confSpec);
- if (confSpec.contains("macosx"))
- assertTrue(iuList.size() == 4);
- else
- assertTrue(iuList.size() == 3);
+ verifyExecIU(iuList, idBase, confSpec);
+ assertTrue(iuList.size() == 3);
}
private void verifyCU(ArrayList iuList, String idBase, String confSpec) {
@@ -205,8 +193,8 @@ public class EquinoxExecutableActionTest extends ActionTest {
for (String path : expectedExecutablesContents) {
assertNotNull("executable zip missing " + path, zip.getEntry(path));
}
-
- checkInfoPlist(zip);
+ if (key.getId().contains("macosx"))
+ checkInfoPlist(zip);
} finally {
zip.close();
}
@@ -222,13 +210,12 @@ public class EquinoxExecutableActionTest extends ActionTest {
boolean found = false;
for (Enumeration<? extends ZipEntry> iter = zip.entries(); !found && iter.hasMoreElements();) {
candidate = iter.nextElement();
- found = candidate.getName().endsWith(".app/Contents/Info.plist");
- }
- if (!found) {
- return;
+ found = candidate.getName().endsWith("Info.plist");
}
+ assertTrue(found);
try {
String contents = readContentsAndClose(zip.getInputStream(candidate));
+ System.out.println("INFO.PLIST.CONTENT IS----> " + contents);
assertEquals(id, getPlistStringValue(contents, "CFBundleIdentifier"));
assertEquals(EXECUTABLE_NAME, getPlistStringValue(contents, "CFBundleExecutable"));
assertEquals(EXECUTABLE_NAME, getPlistStringValue(contents, "CFBundleName"));

Back to the top