Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2011-12-14 11:50:57 -0500
committerDJ Houghton2011-12-14 11:50:57 -0500
commit8acd32afbd56143feca777eab271051f4b0df937 (patch)
tree9d91cf2e42685d0c615db888eec9e2d6db35ac4f
parent34a2a34ac248f397e49927cc70c8dbe479c6c8a1 (diff)
downloadrt.equinox.p2-8acd32afbd56143feca777eab271051f4b0df937.tar.gz
rt.equinox.p2-8acd32afbd56143feca777eab271051f4b0df937.tar.xz
rt.equinox.p2-8acd32afbd56143feca777eab271051f4b0df937.zip
Bug 366425 - Verify end to end tests
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AllTests.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTestCurrent.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From35to36.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From37to38.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/FromPreviousToCurrent.java (renamed from bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From36to37.java)30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install36from35.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install38from37.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java (renamed from bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install37from36.java)22
8 files changed, 140 insertions, 252 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AllTests.java
index 0cd894204..fcf0f32e2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/AllTests.java
@@ -25,14 +25,10 @@ public class AllTests extends TestCase {
suite.addTestSuite(End2EndTest35.class);
suite.addTestSuite(End2EndTest36.class);
suite.addTestSuite(End2EndTest37.class);
+ suite.addTestSuite(End2EndTestCurrent.class);
- suite.addTest(From35to36.suite());
- suite.addTest(From36to37.suite());
- suite.addTest(From37to38.suite());
-
- suite.addTest(Install36from35.suite());
- suite.addTest(Install37from36.suite());
- suite.addTest(Install38from37.suite());
+ suite.addTest(FromPreviousToCurrent.suite());
+ suite.addTest(InstallCurrentFromPrevious.suite());
*/
return suite;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTestCurrent.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTestCurrent.java
new file mode 100644
index 000000000..dea0dc4ce
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTestCurrent.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.full;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.VersionedId;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.TestActivator;
+
+/**
+ * Test installing the latest available platform.
+ */
+public class End2EndTestCurrent extends AbstractEnd2EndTest {
+
+ URI repositoryLocation;
+ VersionedId platform, platformSource;
+
+ protected void validateInstallContent(File installFolder) {
+ FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
+ Manipulator manipulator = fwkAdmin.getManipulator();
+ LauncherData launcherData = manipulator.getLauncherData();
+ launcherData.setFwConfigLocation(new File(installFolder, "configuration"));
+ launcherData.setLauncher(new File(installFolder, getLauncherName("eclipse", Platform.getOS())));
+ try {
+ manipulator.load();
+ } catch (IllegalStateException e) {
+ fail("Error loading the configuration", e);
+ } catch (FrameworkAdminRuntimeException e) {
+ fail("Error loading the configuration", e);
+ } catch (IOException e) {
+ fail("Error loading the configuration", e);
+ }
+
+ assertContains("Can't find VM arg", manipulator.getLauncherData().getJvmArgs(), "-Xms40m");
+ assertContains("Can't find VM arg", manipulator.getLauncherData().getJvmArgs(), "-Xmx384m");
+
+ String[] programArgs = manipulator.getLauncherData().getProgramArgs();
+ assertContains("Can't find program arg", programArgs, "-startup");
+ assertContains("Can't find program arg", programArgs, "-showsplash");
+ assertContains("Can't find program arg", programArgs, "org.eclipse.platform");
+
+ assertTrue(manipulator.getConfigData().getBundles().length > 50);
+
+ assertTrue(new File(installFolder, "plugins").exists());
+ assertTrue(new File(installFolder, "features").exists());
+
+ }
+
+ protected URI getRepositoryLocation() {
+ if (repositoryLocation == null) {
+ String repository = TestActivator.getContext().getProperty("org.eclipse.equinox.p2.tests.current.build.repo");
+ assertNotNull("Need set the \'org.eclipse.equinox.p2.tests.current.build.repo\' property.", repository);
+ repositoryLocation = URI.create(repository);
+ }
+ return repositoryLocation;
+ }
+
+ /*
+ * Look up the given IU id in the repo
+ */
+ private IInstallableUnit getIU(String id) {
+ IMetadataRepository repo = null;
+ try {
+ repo = loadMetadataRepository(getRepositoryLocation());
+ } catch (ProvisionException e) {
+ fail("Problem loading repository: " + getRepositoryLocation(), e);
+ }
+ IQueryResult result = repo.query(QueryUtil.createIUQuery(id), getMonitor());
+ if (result.isEmpty())
+ fail("Unable to load iu: \'" + id + "\' from repository: " + getRepositoryLocation());
+ return (IInstallableUnit) result.iterator().next();
+ }
+
+ protected VersionedId getPlatform() {
+ if (platform == null) {
+ IInstallableUnit iu = getIU("org.eclipse.platform.ide");
+ platform = new VersionedId(iu.getId(), iu.getVersion());
+ }
+ return platform;
+ }
+
+ protected VersionedId getPlatformSource() {
+ if (platformSource == null) {
+ IInstallableUnit iu = getIU("org.eclipse.platform.source.feature.group");
+ platformSource = new VersionedId(iu.getId(), iu.getVersion());
+ }
+ return platformSource;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From35to36.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From35to36.java
deleted file mode 100644
index 960aa180f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From35to36.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.full;
-
-import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
-
-public class From35to36 extends AbstractReconcilerTest {
-
- public From35to36(String string) {
- super(string);
- }
-
- public static Test suite() {
- TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.35.platform.archive");
- suite.addTest(new From35to36("from35To36"));
- return suite;
- }
-
- public void from35To36() {
- assertInitialized();
- String repository = "http://download.eclipse.org/eclipse/updates/3.6";
- runInitialize("Initializing 3.5 to get the profile paths properly setup.");
- SimpleProfileRegistry registry = new SimpleProfileRegistry(getAgent(), new File(output, "eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/"), null, false);
- String initialTimestamp = Long.toString(registry.getProfile("PlatformProfile").getTimestamp());
-
- //Take 3.5 archive, unzip, run it to update to 3.6
- assertEquals(0, runDirectorToUpdate("Updating from 3.5 to 3.6", repository, "org.eclipse.platform.ide", "org.eclipse.platform.ide"));
- assertEquals(0, installAndRunVerifierBundle(null));
-
- // revert to 3.5
- assertEquals(0, runDirectorToRevert("Reverting from 3.6 to 3.5", "http://download.eclipse.org/eclipse/updates/3.5", initialTimestamp));
- assertEquals(0, installAndRunVerifierBundle35(null));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From37to38.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From37to38.java
deleted file mode 100644
index d906e32eb..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From37to38.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.full;
-
-import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
-
-public class From37to38 extends AbstractReconcilerTest {
-
- public From37to38(String string) {
- super(string);
- }
-
- public static Test suite() {
- TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.37.platform.archive");
- suite.addTest(new From37to38("from37To38"));
- return suite;
- }
-
- public void from37To38() {
- assertInitialized();
- String currentBuildRepo = System.getProperty("org.eclipse.equinox.p2.tests.current.build.repo");
- // TODO this will change once Juno is released:
- // http://download.eclipse.org/eclipse/updates/3.8
- if (currentBuildRepo == null)
- currentBuildRepo = "http://download.eclipse.org/eclipse/updates/3.8-I-builds";
- runInitialize("Initializing 3.7 to get the profile paths properly setup.");
- SimpleProfileRegistry registry = new SimpleProfileRegistry(getAgent(), new File(output, "eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/"), null, false);
- String initialTimestamp = Long.toString(registry.getProfile("PlatformProfile").getTimestamp());
-
- //Take 3.7 archive, unzip, run it to update to 3.8
- assertEquals(0, runDirectorToUpdate("Updating from 3.7 to 3.8", currentBuildRepo, "org.eclipse.platform.ide", "org.eclipse.platform.ide"));
- assertEquals(0, installAndRunVerifierBundle(null));
-
- // revert to 3.7
- assertEquals(0, runDirectorToRevert("Reverting from 3.8 to 3.7", "http://download.eclipse.org/eclipse/updates/3.7", initialTimestamp));
- assertEquals(0, installAndRunVerifierBundle(null));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From36to37.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/FromPreviousToCurrent.java
index 9d20493a4..9a86e11fa 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From36to37.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/FromPreviousToCurrent.java
@@ -14,34 +14,42 @@ import java.io.File;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
+import org.eclipse.equinox.p2.tests.TestActivator;
import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
-public class From36to37 extends AbstractReconcilerTest {
+/*
+ * Take the last release archive and then update to the current build. Then revert back.
+ */
+public class FromPreviousToCurrent extends AbstractReconcilerTest {
- public From36to37(String string) {
+ public FromPreviousToCurrent(String string) {
super(string);
}
public static Test suite() {
- TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.36.platform.archive");
- suite.addTest(new From36to37("from36To37"));
+ TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.last.release.platform.archive");
+ suite.addTest(new FromPreviousToCurrent("fromPreviousToCurrent"));
return suite;
}
- public void from36To37() {
+ public void fromPreviousToCurrent() {
assertInitialized();
- String repository = "http://download.eclipse.org/eclipse/updates/3.7";
- runInitialize("Initializing 3.6 to get the profile paths properly setup.");
+ String currentBuildRepo = TestActivator.getContext().getProperty("org.eclipse.equinox.p2.tests.current.build.repo");
+ assertNotNull("Need set the \'org.eclipse.equinox.p2.tests.current.build.repo\' property.", currentBuildRepo);
+ String lastReleaseBuildRepo = TestActivator.getContext().getProperty("org.eclipse.equinox.p2.tests.last.release.build.repo");
+ assertNotNull("Need to set the \'org.eclipse.equinox.p2.tests.last.release.build.repo\' property.", lastReleaseBuildRepo);
+
+ runInitialize("Initializing lastest release to get the profile paths properly setup.");
SimpleProfileRegistry registry = new SimpleProfileRegistry(getAgent(), new File(output, "eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/"), null, false);
String initialTimestamp = Long.toString(registry.getProfile("PlatformProfile").getTimestamp());
- //Take 3.6 archive, unzip, run it to update to 3.7
- assertEquals(0, runDirectorToUpdate("Updating from 3.6 to 3.7", repository, "org.eclipse.platform.ide", "org.eclipse.platform.ide"));
+ //Take the platform archive from the latest release, unzip, run it to update to the current build
+ assertEquals(0, runDirectorToUpdate("Updating from last release to current build", currentBuildRepo, "org.eclipse.platform.ide", "org.eclipse.platform.ide"));
assertEquals(0, installAndRunVerifierBundle(null));
- // revert to 3.6
- assertEquals(0, runDirectorToRevert("Reverting from 3.7 to 3.6", "http://download.eclipse.org/eclipse/updates/3.6", initialTimestamp));
+ // revert to the last release
+ assertEquals(0, runDirectorToRevert("Reverting from current build to last release", lastReleaseBuildRepo, initialTimestamp));
assertEquals(0, installAndRunVerifierBundle(null));
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install36from35.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install36from35.java
deleted file mode 100644
index 55aa9ef72..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install36from35.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.full;
-
-import java.io.*;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.p2.tests.TestActivator;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
-
-//Install 3.6 using 3.5
-public class Install36from35 extends AbstractReconcilerTest {
- public Install36from35(String string) {
- super(string);
- }
-
- public int runDirectorToInstall(String message, File installFolder, String sourceRepo, String iuToInstall) {
- File root = new File(TestActivator.getContext().getProperty("java.home"));
- root = new File(root, "bin");
- File exe = new File(root, "javaw.exe");
- if (!exe.exists())
- exe = new File(root, "java");
- String[] command = new String[] {(new File(output, "eclipse/eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", //
- "-consoleLog", "-application", "org.eclipse.equinox.p2.director", "-vm", exe.getAbsolutePath(), //
- "-repository", sourceRepo, "-installIU", iuToInstall, //
- "-destination", installFolder.getAbsolutePath(), //
- "-bundlepool", installFolder.getAbsolutePath(), //
- "-roaming", "-profile", "PlatformProfile", "-profileProperties", "org.eclipse.update.install.features=true", //
- "-p2.os", Platform.getOS(), "-p2.ws", Platform.getWS(), "-p2.arch", Platform.getOSArch(), //
- "-vmArgs", "-Dosgi.checkConfiguration=true", "-Xms40m", "-Xmx256m", //
- //, "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" //for debugging
- };
-
- return run(message, command, new File(installFolder.getParentFile(), "log.log"));
- }
-
- public static Test suite() {
- TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.35.platform.archive");
- suite.addTest(new Install36from35("install36From35"));
- return suite;
- }
-
- public void install36From35() throws IOException {
- assertInitialized();
- //Create a new installation of 3.6 using 3.5
- File installFolder = getTestFolder("install36From35");
- System.out.println(installFolder);
- int result = runDirectorToInstall("Installing 3.6 from 3.5", new File(installFolder, "eclipse"), "http://download.eclipse.org/eclipse/updates/3.6", "org.eclipse.platform.ide");
- if (result != 0) {
- File logFile = new File(installFolder, "log.log");
- if (logFile.exists()) {
- StringBuffer fileContents = new StringBuffer();
- BufferedReader reader = new BufferedReader(new FileReader(logFile));
- while (reader.ready())
- fileContents.append(reader.readLine());
- reader.close();
- fail("runDirector returned " + result + "\n" + fileContents.toString());
- } else {
- fail("runDirector returned " + result);
- }
- }
- assertEquals(0, installAndRunVerifierBundle(installFolder));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install38from37.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install38from37.java
deleted file mode 100644
index 4f3820f8b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install38from37.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.full;
-
-import java.io.*;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
-import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
-
-//Install 3.8 using 3.7
-public class Install38from37 extends AbstractReconcilerTest {
- public Install38from37(String string) {
- super(string);
- }
-
- public static Test suite() {
- TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.37.platform.archive");
- suite.addTest(new Install38from37("install38From37"));
- return suite;
- }
-
- public void install38From37() throws IOException {
- assertInitialized();
- //Create a new installation of 3.8 using 3.7
- File installFolder = getTestFolder("install38From37");
- // TODO this URL will change once Juno is released.
- // http://download.eclipse.org/eclipse/updates/3.8
- int result = runDirectorToInstall("Installing 3.8 from 3.7", new File(installFolder, "eclipse"), "http://download.eclipse.org/eclipse/updates/3.8-I-builds", "org.eclipse.platform.ide");
- if (result != 0) {
- File logFile = new File(installFolder, "log.log");
- if (logFile.exists()) {
- StringBuffer fileContents = new StringBuffer();
- BufferedReader reader = new BufferedReader(new FileReader(logFile));
- while (reader.ready())
- fileContents.append(reader.readLine());
- reader.close();
- fail("runDirector returned " + result + "\n" + fileContents.toString());
- } else {
- fail("runDirector returned " + result);
- }
- }
- assertEquals(0, installAndRunVerifierBundle(installFolder));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install37from36.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java
index 85bc81367..3f488b390 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install37from36.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/InstallCurrentFromPrevious.java
@@ -13,26 +13,30 @@ package org.eclipse.equinox.p2.tests.full;
import java.io.*;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.eclipse.equinox.p2.tests.TestActivator;
import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
-//Install 3.7 using 3.6
-public class Install37from36 extends AbstractReconcilerTest {
- public Install37from36(String string) {
+/*
+ * Use the last release archive to install the current build.
+ */
+public class InstallCurrentFromPrevious extends AbstractReconcilerTest {
+ public InstallCurrentFromPrevious(String string) {
super(string);
}
public static Test suite() {
- TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.36.platform.archive");
- suite.addTest(new Install37from36("install37From36"));
+ TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.last.release.platform.archive");
+ suite.addTest(new InstallCurrentFromPrevious("installCurrentFromPrevious"));
return suite;
}
- public void install37From36() throws IOException {
+ public void installCurrentFromPrevious() throws IOException {
assertInitialized();
- //Create a new installation of 3.7 using 3.6
- File installFolder = getTestFolder("install37From36");
- int result = runDirectorToInstall("Installing 3.7 from 3.6", new File(installFolder, "eclipse"), "http://download.eclipse.org/eclipse/updates/3.7", "org.eclipse.platform.ide");
+ File installFolder = getTestFolder("installCurrentFromPrevious");
+ String repository = TestActivator.getContext().getProperty("org.eclipse.equinox.p2.tests.current.build.repo");
+ assertNotNull("Need set the \'org.eclipse.equinox.p2.tests.current.build.repo\' property.", repository);
+ int result = runDirectorToInstall("Installing current build from last release", new File(installFolder, "eclipse"), repository, "org.eclipse.platform.ide");
if (result != 0) {
File logFile = new File(installFolder, "log.log");
if (logFile.exists()) {

Back to the top