Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2009-09-24 14:27:10 +0000
committerAndrew Niefer2009-09-24 14:27:10 +0000
commit151446f6878d2c293e741f41e0adbb3886f3f2d8 (patch)
treedc28083066249dbb2596f8e645a593db384a402e /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant
parentf50dcb02bd8e1ed07ffae3311d3003e6611fe4fd (diff)
downloadrt.equinox.p2-151446f6878d2c293e741f41e0adbb3886f3f2d8.tar.gz
rt.equinox.p2-151446f6878d2c293e741f41e0adbb3886f3f2d8.tar.xz
rt.equinox.p2-151446f6878d2c293e741f41e0adbb3886f3f2d8.zip
bug 289345 - repo2runnable stops when some IUs are missing
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/Repo2RunnableTaskTests.java34
1 files changed, 33 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/Repo2RunnableTaskTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/Repo2RunnableTaskTests.java
index b67cec999..cbfc2ef4e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/Repo2RunnableTaskTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/Repo2RunnableTaskTests.java
@@ -30,7 +30,7 @@ public class Repo2RunnableTaskTests extends AbstractAntProvisioningTest {
public void setUp() throws Exception {
source = getTestData("Error loading data", "testData/mirror/mirrorSourceRepo1 with space").toURI();
- destination = getTempFolder().toURI();
+ destination = getTestFolder(getName()).toURI();
super.setUp();
}
@@ -75,6 +75,38 @@ public class Repo2RunnableTaskTests extends AbstractAntProvisioningTest {
assertTrue("Unexpected format", expectedFormat(destination));
}
+ public void testRepo2RunnableFailOnError() {
+ source = getTestData("Error loading data", "testData/mirror/mirrorSourceRepo3").toURI();
+ URI binary = getTestData("Error loading binary data", "testData/testRepos/binary.repo").toURI();
+
+ AntTaskElement mirror = new AntTaskElement("p2.mirror");
+ AntTaskElement sourceRepo = new AntTaskElement("source");
+ sourceRepo.addElement(getRepositoryElement(source, TYPE_BOTH));
+ sourceRepo.addElement(getRepositoryElement(binary, TYPE_BOTH));
+ mirror.addElement(sourceRepo);
+ mirror.addElement(getRepositoryElement(destination, TYPE_BOTH));
+ addTask(mirror);
+
+ AntTaskElement delete = new AntTaskElement("delete");
+ delete.addAttribute("file", getTestFolder(getName()) + "/plugins/helloworld_1.0.0.jar");
+ addTask(delete);
+
+ getArtifactRepositoryManager().removeRepository(binary);
+ getMetadataRepositoryManager().removeRepository(binary);
+ getArtifactRepositoryManager().removeRepository(source);
+ getMetadataRepositoryManager().removeRepository(source);
+ source = destination;
+
+ File destinationFile = new File(getTestFolder(getName()), "repo2");
+ destination = destinationFile.toURI();
+
+ AntTaskElement task = createRepo2RunnableTaskElement(TYPE_BOTH);
+ task.addAttribute("failOnError", "false");
+
+ runAntTask();
+ assertTrue(new File(destinationFile, "binary/f_root_1.0.0").exists());
+ }
+
/*
* Ensure that the output repository is of the expected type
*/

Back to the top