summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Daniel2013-11-28 03:33:54 (EST)
committerKrzysztof Daniel2013-11-28 03:40:27 (EST)
commitab3a3cd49275494ecf24e8ea1d963c0857c7d087 (patch)
tree0cd25388629344e1d2a2e70e15a2fb8e936d4d79
parent10bcad986a10632b52b9d8ef868bae3a739d7c87 (diff)
downloadrt.equinox.p2-ab3a3cd49275494ecf24e8ea1d963c0857c7d087.zip
rt.equinox.p2-ab3a3cd49275494ecf24e8ea1d963c0857c7d087.tar.gz
rt.equinox.p2-ab3a3cd49275494ecf24e8ea1d963c0857c7d087.tar.bz2
bug 422043 - 7 ConfigurationTests failed in official buildI20131209-0800I20131208-2000I20131203-0800refs/changes/40/19040/1
Partial revert of commits 10bcad9, b776de6, 1413f8a, 0dae0e9. What is left: * usage of canonical paths in the configuration tests. This is a real fix for this bug, as Configuration could write Windows specific paths, which were not handled properly in tests (java paths were using Unix-like convention - "/" and lower-case drive letters, while tests were adopting Windows convention - "\" when the tmp path was configured via command line. * I've also left changes responsible for improved deleting of work directories - current clean up method couldn't delete readonly children, so every child is now being made readable, writeable and executable before being deleted. Change-Id: I3686fbfc19950f454f945d01c53b149c9a2d93ab Signed-off-by: Krzysztof Daniel <kdaniel@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java6
3 files changed, 5 insertions, 27 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
index 9b5a35f..92f62ba 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
@@ -611,11 +611,8 @@ public abstract class AbstractProvisioningTest extends TestCase {
file.setReadable(true);
file.setExecutable(true);
File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++) {
- if (!delete(children[i])) {
- System.out.println(">> deleting failed" + children[i]);
- }
- }
+ for (int i = 0; i < children.length; i++)
+ delete(children[i]);
}
if (!file.delete()) {
file.setWritable(true);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
index 45f2413..ef88cc3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
@@ -314,9 +314,7 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
}
protected File getBundlesInfo() {
- File file = new File(output, "eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info");
- System.out.println(">>> getBundlesInfo = " + file);
- return file;
+ return new File(output, "eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info");
}
public boolean isInBundlesInfo(String bundleId, String version) throws IOException {
@@ -442,12 +440,9 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
return;
for (Iterator iter = toRemove.iterator(); iter.hasNext();) {
File next = (File) iter.next();
- if (!delete(next)) {
- System.out.println("deleting failed!!! " + next);
- }
+ delete(next);
}
output = null;
- System.out.println(">>> removing " + toRemove);
toRemove.clear();
}
@@ -457,9 +452,6 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
public Configuration getConfiguration() {
File configLocation = new File(output, "eclipse/configuration/org.eclipse.update/platform.xml");
File installLocation = new File(output, "eclipse");
- System.out.println(">>> getConfiguration");
- System.out.println(" configLocation = " + configLocation);
- System.out.println(" installLocation = " + installLocation);
return loadConfiguration(configLocation, installLocation);
}
@@ -496,7 +488,6 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
* has a url matching the given location.
*/
public boolean removeSite(Configuration configuration, String location) throws IOException, URISyntaxException {
- System.out.println("remove site location = " + location);
File left = new File(new URI(location)).getCanonicalFile();
List sites = configuration.getSites();
for (Iterator iter = sites.iterator(); iter.hasNext();) {
@@ -504,12 +495,8 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
String siteURL = tempSite.getUrl();
File right = new File(new URI(siteURL)).getCanonicalFile();
if (left.equals(right)) {
- System.out.println("Match " + siteURL);
- boolean result = configuration.removeSite(tempSite);
- System.out.println("removed " + result);
- return result;
+ return configuration.removeSite(tempSite);
}
- System.out.println("No match " + siteURL);
}
return false;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java
index 9b487a7..5092581 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ConfigurationTests.java
@@ -58,7 +58,6 @@ public class ConfigurationTests extends AbstractReconcilerTest {
public void testDiscoverOne() {
// copy feature and bundle to dropins and reconcile
assertInitialized();
- System.out.println(">>> testDiscoverOne " + output);
File featureFile = getTestData("2.0", "testData/reconciler/features/myFeature_1.0.0");
add("2.2", "dropins/features", featureFile);
File bundleFile = getTestData("2.3", "testData/reconciler/plugins/myBundle_1.0.0.jar");
@@ -90,13 +89,10 @@ public class ConfigurationTests extends AbstractReconcilerTest {
*/
public void testSiteEnabled() throws IOException, URISyntaxException {
assertInitialized();
- System.out.println(">>> testSiteEnabled " + output);
File temp = getTempFolder();
- System.out.println(" temp folder location = " + temp);
toRemove.add(temp);
Configuration configuration = getConfiguration();
String siteLocation = new File(temp, "eclipse").getCanonicalFile().toURI().toString();
- System.out.println(" site location = " + siteLocation);
File source = getTestData("2.0", "testData/reconciler/ext.jar");
copy("2.1", source, temp);
@@ -147,11 +143,9 @@ public class ConfigurationTests extends AbstractReconcilerTest {
*/
public void test_247095() throws IOException, URISyntaxException {
assertInitialized();
- System.out.println(">>> test_247095 " + output);
Configuration configuration = getConfiguration();
File temp = getTempFolder();
toRemove.add(temp);
- System.out.println(" temp=" + temp);
String siteLocation = null;
siteLocation = new File(temp, "eclipse").getCanonicalFile().toURI().toString();