Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2009-04-01 20:58:42 +0000
committerPascal Rapicault2009-04-01 20:58:42 +0000
commit086cee8cb5803dd379c5fc04e4a52985de020ee6 (patch)
tree44225cd41d34d7f6a24fb4cc8caa958c17153cbc /bundles/org.eclipse.equinox.frameworkadmin.test
parent7479e9890c5afd82fb1605ac4a3d5203d073d6b0 (diff)
downloadrt.equinox.p2-086cee8cb5803dd379c5fc04e4a52985de020ee6.tar.gz
rt.equinox.p2-086cee8cb5803dd379c5fc04e4a52985de020ee6.tar.xz
rt.equinox.p2-086cee8cb5803dd379c5fc04e4a52985de020ee6.zip
Bug 269502 [fwkAdmin] -vm options is corrupted during autorestart after working with update site
Diffstat (limited to 'bundles/org.eclipse.equinox.frameworkadmin.test')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch10
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java23
2 files changed, 29 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch b/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch
index 874f0ea3a..41f2e9dd2 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
@@ -6,12 +6,13 @@
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.ui,org.eclipse.ecf,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.sar,org.eclipse.ecf.identity,org.eclipse.equinox.p2.selfhosting,org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.tests,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.director,ie.wombat.jbdiff,ie.wombat.jbdiff.test,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.ui.sdk,org.eclipse.equinox.p2.engine,org.eclipse.ecf.filetransfer,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.exemplarysetup,org.eclipse.equinox.p2.console,org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.tools,org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.ecf.provider.filetransfer,org.eclipse.equinox.p2.updatechecker"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.tools,org.eclipse.equinox.p2.selfhosting,org.eclipse.equinox.p2.ui.admin.rcp,ie.wombat.jbdiff.test,org.eclipse.equinox.p2.ui.sdk"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
@@ -23,6 +24,7 @@
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.equinox.frameworkadmin.tests.AllTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
@@ -30,7 +32,9 @@
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.equinox.p2.director.app.product"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.ui.win32,org.eclipse.core.net,org.eclipse.osgi,org.eclipse.core.resources.compatibility,org.eclipse.help,org.eclipse.ui,org.eclipse.core.databinding,org.eclipse.core.jobs,org.eclipse.swt,org.eclipse.core.runtime.compatibility.auth,org.eclipse.equinox.registry,org.eclipse.core.filesystem,org.eclipse.swt.win32.win32.x86,org.eclipse.core.resources,org.eclipse.equinox.common,org.eclipse.ui.ide,org.eclipse.text,org.eclipse.ui.forms,org.eclipse.core.runtime,org.eclipse.jface,org.eclipse.equinox.app,org.eclipse.update.core.win32,org.eclipse.core.filesystem.win32.x86,org.eclipse.core.expressions,org.eclipse.core.variables,org.eclipse.equinox.preferences,org.eclipse.ant.core,org.eclipse.core.contenttype,org.eclipse.ui.workbench,org.eclipse.ui.views,org.eclipse.osgi.services,com.ibm.icu,org.eclipse.jface.text,org.eclipse.update.ui,javax.servlet,org.eclipse.jface.databinding,org.eclipse.core.commands,org.eclipse.core.runtime.compatibility.registry"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.core.filesystem@default:default,org.eclipse.update.core@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.forms@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ui.console@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.swt@default:default,org.eclipse.help@default:default,org.eclipse.update.ui@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.core.filebuffers@default:default,org.eclipse.debug.core@default:default,org.eclipse.ant.core@default:default,com.ibm.icu@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.update.configurator@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.search@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.core.net@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.security@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.team.ui@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.compare.core@default:default,javax.servlet@default:default,org.eclipse.ui@default:default,org.apache.ant@default:default,org.eclipse.osgi@-1:true,org.junit@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.text@default:default,org.eclipse.debug.ui@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.jface@default:default,org.eclipse.team.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.security.ui@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.tests.harness@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.tests.ui@default:default,org.eclipse.equinox.p2.examples.rcp.cloud@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.easymock@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.tests.optimizers@default:default,org.eclipse.equinox.frameworkadmin.test@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.sat4j.pb@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.installer@default:default,org.eclipse.equinox.p2.tests@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.test.performance@default:default,org.apache.commons.logging@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="false"/>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
index 97c232cfc..b25036a6b 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
@@ -1,5 +1,7 @@
package org.eclipse.equinox.frameworkadmin.tests;
+import org.eclipse.core.runtime.Platform;
+
import java.io.File;
import java.io.IOException;
import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
@@ -22,6 +24,8 @@ public class TestVMArg extends FwkAdminAndSimpleConfiguratorTest {
File jreLocation = new File(m.getLauncherData().getLauncher().getParentFile(), "jre");
m.getLauncherData().setJvm(jreLocation);
m.save(false);
+ assertNotContent(new File(getInstallFolder(), "eclipse.ini"), jreLocation.getAbsolutePath());
+ assertContent(new File(getInstallFolder(), "eclipse.ini"), "jre");
assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
assertContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
@@ -34,15 +38,32 @@ public class TestVMArg extends FwkAdminAndSimpleConfiguratorTest {
assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
}
- public void tesVMOutsideInstall() throws FrameworkAdminRuntimeException, IOException {
+ public void testVMOutsideInstall() throws FrameworkAdminRuntimeException, IOException {
//Test VM path in the install folder
File jreLocation = new File(m.getLauncherData().getLauncher().getParentFile(), "../../jre").getCanonicalFile();
m.getLauncherData().setJvm(jreLocation);
m.save(false);
+ assertContent(new File(getInstallFolder(), "eclipse.ini"), jreLocation.getAbsolutePath());
assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
assertContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
m.load();
assertEquals(jreLocation, m.getLauncherData().getJvm());
}
+
+ public void test269502() throws FrameworkAdminRuntimeException, IOException {
+ //Test VM path in the install folder
+ String winPath = "c:/ibm5sr3/bin/";
+ String linuxPath = "/Users/Pascal/ibm5sr3/bin";
+ String chosenPath = Platform.getOS().equals("win32") ? winPath : linuxPath;
+ File jreLocation = new File(chosenPath);
+ m.getLauncherData().setJvm(jreLocation);
+ m.save(false);
+ assertContent(new File(getInstallFolder(), "eclipse.ini"), chosenPath);
+ assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
+ assertContent(m.getLauncherData().getLauncherConfigLocation(), chosenPath);
+ assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
+ m.load();
+ assertEquals(jreLocation, m.getLauncherData().getJvm());
+ }
}

Back to the top