Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2021-06-19 15:32:31 -0400
committerJonah Graham2021-06-19 15:32:31 -0400
commitdcbb2a51bbc505585ef372a9e3501577c72abf4f (patch)
treed89ce976faa00557fb908d4689ae53c9964c647b
parent6b332e35cdb05e642af32c9d6151e1488d1da476 (diff)
downloadorg.eclipse.cdt-CDT_10_3_1.tar.gz
org.eclipse.cdt-CDT_10_3_1.tar.xz
org.eclipse.cdt-CDT_10_3_1.zip
Bug 574331: Set default query results for testsCDT_10_3_1
Most of the tests in this bundle already had this bit of code before calling create project. This makes BuildDescriptionModelTests consistent with the rest. Note that this modifies global state and does not restore it. However, as that is consistent with the other tests in this bundle, and the global state is only maintained while running tests on this bundle, I am not fixing this aspect of the code. Change-Id: I2004af177a959e1efbd45b23c960b517d8993b7c
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
index 5cd67e38e39..ee09c004a19 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
@@ -55,6 +55,7 @@ import org.eclipse.cdt.managedbuilder.internal.buildmodel.DbgUtil;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
+import org.eclipse.cdt.managedbuilder.projectconverter.UpdateManagedProjectManager;
import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -62,6 +63,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -877,6 +879,17 @@ public class BuildDescriptionModelTests extends TestCase {
}
private IProject createProject(String name, String id) {
+
+ // In case the projects need to be updated...
+ IOverwriteQuery queryALL = new IOverwriteQuery() {
+ @Override
+ public String queryOverwrite(String file) {
+ return ALL;
+ }
+ };
+ UpdateManagedProjectManager.setBackupFileOverwriteQuery(queryALL);
+ UpdateManagedProjectManager.setUpdateProjectQuery(queryALL);
+
IProject proj = ManagedBuildTestHelper.createProject(name, id);
if (proj != null)
fCompositeCleaner.addRunnable(new ProjectCleaner(proj));

Back to the top