From 424485c9711ec643a97a19c81f22a04103648204 Mon Sep 17 00:00:00 2001 From: Andrew Ferguson Date: Tue, 15 Jan 2008 17:08:11 +0000 Subject: [PATCH] 197468: apply fix --- .../testplugin/ManagedBuildTestHelper.java | 39 ++++ .../AppendToMBSStringListOptionValues.xml | 36 +++- .../testdata/AppendToMBSStringOptionValue.xml | 4 +- .../testdata/CreateIncludeFolder.xml | 4 +- .../testdata/ExcludeResources.xml | 4 +- .../testdata/NewManagedProject.xml | 5 +- .../testdata/SetMBSBooleanOptionValue.xml | 4 +- .../testdata/SetMBSStringListOptionValues.xml | 4 +- .../testdata/SetMBSStringOptionValue.xml | 4 +- .../tests/AllTemplateEngineTests.java | 19 +- .../templateengine/tests/TestProcesses.java | 193 ++++++++++-------- .../AppendToMBSStringListOptionValues.java | 88 ++++---- .../SetMBSStringListOptionValues.java | 8 + .../cdt/core/templateengine/TemplateCore.java | 1 - .../templateengine/TemplateEngineHelper.java | 1 - 15 files changed, 265 insertions(+), 149 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java index a48c1074016..7fe98f01501 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java @@ -26,6 +26,7 @@ import junit.framework.TestCase; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ICDescriptor; +import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.managedbuilder.core.BuildException; import org.eclipse.cdt.managedbuilder.core.IAdditionalInput; import org.eclipse.cdt.managedbuilder.core.IBuildObject; @@ -629,6 +630,44 @@ public class ManagedBuildTestHelper { } } } + + /* + * Cloned from core CProjectHelper + */ + public static void delete(ICProject cproject) { + try { + cproject.getProject().delete(true, true, null); + } catch (CoreException e) { + try { + Thread.sleep(1000); + } catch (InterruptedException e1) { + } finally { + try { + System.gc(); + System.runFinalization(); + cproject.getProject().delete(true, true, null); + } catch (CoreException e2) { + Assert.fail(getMessage(e2.getStatus())); + } + } + } + } + + /* + * Cloned from core CProjectHelper + */ + private static String getMessage(IStatus status) { + StringBuffer message = new StringBuffer("["); + message.append(status.getMessage()); + if (status.isMultiStatus()) { + IStatus children[] = status.getChildren(); + for( int i = 0; i < children.length; i++) { + message.append(getMessage(children[i])); + } + } + message.append("]"); + return message.toString(); + } static private void deleteDirectory(File dir) { boolean b; diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringListOptionValues.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringListOptionValues.xml index 3828ccc6c95..d132b128170 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringListOptionValues.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringListOptionValues.xml @@ -5,7 +5,9 @@ - + + + @@ -39,6 +41,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringOptionValue.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringOptionValue.xml index 526809bacae..44ed173de87 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringOptionValue.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringOptionValue.xml @@ -5,7 +5,9 @@ - + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/CreateIncludeFolder.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/CreateIncludeFolder.xml index dec5ff13268..6aa7b359f71 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/CreateIncludeFolder.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/CreateIncludeFolder.xml @@ -5,7 +5,9 @@ - + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/ExcludeResources.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/ExcludeResources.xml index 4334d98915b..1e5e389bd0a 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/ExcludeResources.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/ExcludeResources.xml @@ -5,7 +5,9 @@ - + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/NewManagedProject.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/NewManagedProject.xml index 240a362a8fe..8b3cd71ac64 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/NewManagedProject.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/NewManagedProject.xml @@ -5,8 +5,9 @@ - - + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSBooleanOptionValue.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSBooleanOptionValue.xml index eebe1fd11d7..4e0c78ceda1 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSBooleanOptionValue.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSBooleanOptionValue.xml @@ -5,7 +5,9 @@ - + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringListOptionValues.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringListOptionValues.xml index b83d7512a03..7c33a85ac72 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringListOptionValues.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringListOptionValues.xml @@ -5,7 +5,9 @@ - + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringOptionValue.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringOptionValue.xml index 50c089b8987..b36f4d6657c 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringOptionValue.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringOptionValue.xml @@ -5,7 +5,9 @@ - + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/AllTemplateEngineTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/AllTemplateEngineTests.java index ac589bfee3e..67befb47b80 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/AllTemplateEngineTests.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/AllTemplateEngineTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Symbian Software Limited and others. + * Copyright (c) 2007 2008 Symbian Software Limited 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 @@ -15,33 +15,32 @@ import junit.framework.TestSuite; /** * This is a TestSuite, the TestCases created to test Template engine are - * added to testsuite. - * The test suite will execute all the Testcases added to the Suite. + * added to test-suite. The test suite will execute all the test cases added + * to the Suite. * * @since 4.0 */ - public class AllTemplateEngineTests extends TestSuite{ public static void main(String[] args) { junit.swingui.TestRunner.run(AllTemplateEngineTests.class); } - + /** * Since the TemplateEngine consists of UI(Wizard). * A TestWizard is created to which the dynamically generated * UIPages are added. The Wizard is launched from here. * The TestCases created to test the TemplateEngine is initialized here. * @return - * - * @since 4.0 + * + * @since 4.0 */ public static Test suite() { TestSuite suite = new TestSuite("Template engine tests"); //$NON-NLS-1$ //$JUnit-BEGIN$ - -// suite.addTestSuite(TestProcesses.class); - + + suite.addTestSuite(TestProcesses.class); + //$JUnit-END$ return suite; } diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TestProcesses.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TestProcesses.java index 150e7112013..f444b912dd8 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TestProcesses.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TestProcesses.java @@ -16,65 +16,86 @@ import java.util.Map; import junit.framework.TestCase; +import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.templateengine.TemplateCore; import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.cdt.core.templateengine.TemplateEngineHelper; import org.eclipse.cdt.managedbuilder.core.BuildException; import org.eclipse.cdt.managedbuilder.core.IConfiguration; import org.eclipse.cdt.managedbuilder.core.IOption; import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration; import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.NullProgressMonitor; -public class TestProcesses extends TestCase { - +public class TestProcesses extends TestCase { private static final String workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getRawLocation().toOSString(); - private static final String PROJECT_NAME = "TemplateEngineTestsProject"; //$NON-NLS-1$ - private static final String SOURCE_FOLDER = "Source"; //$NON-NLS-1$ private static final String INCLUDE_FOLDER = "Include"; //$NON-NLS-1$ - private static final String FILE_NAME = "File"; //$NON-NLS-1$ - private static final String LINK = "Link"; //$NON-NLS-1$ private static final String APPEND = "Append"; //$NON-NLS-1$ - private static final String CPP_EXT = ".cpp"; //$NON-NLS-1$ - private static final String H_EXT = ".h"; //$NON-NLS-1$ private static final String MBS_GNU_CPP_LINK_OPTION_ID = ".*gnu.cpp.link.option.*"; //$NON-NLS-1$ private static final String MBS_STRING_OPTION_VALUE = "MBSStringOption"; //$NON-NLS-1$ private static final String[] MBS_STRING_LIST_OPTION_VALUES = {"MBS", "String", "List", "Option"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ private static final String RELEASE_CONFIG_ID = ".*release.*"; //$NON-NLS-1$ private static final String PROJECT_TYPE = "org.eclipse.cdt.managedbuilder.core.tests.projectType"; //$NON-NLS-1$ - - private List configList; + + String projectName; protected void setUp() throws Exception { TemplateEngineTestsHelper.turnOffAutoBuild(); - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); - if (project.exists()) { - project.delete(true, true, null); - } - configList = new ArrayList(); - //TODO: Add valid configurations for project creation - configList.add(new IConfiguration[0]); + projectName= "TemplateEngineTestsProject"+System.currentTimeMillis(); } + protected void tearDown() throws Exception { + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); + project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); + if (project.exists()) { + try { + ManagedBuildTestHelper.delete(CoreModel.getDefault().create(project)); + } catch(Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + } + + /** + * @return a sensible number of arbitrary IConfiguration objects + */ + private List/**/ getConfigurations() { + List/**/ result= new ArrayList/**/(); + IConfiguration[] configs= ManagedBuildManager.getExtensionConfigurations(); + for(int i=0; i5) { + result= result.subList(0, 4); + } + return result; + } + public void testCreateIncludeFolder() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*CreateIncludeFolder"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("includeDir1", INCLUDE_FOLDER + 1); //$NON-NLS-1$ valueStore.put("includeDir2", INCLUDE_FOLDER + 2); //$NON-NLS-1$ - valueStore.put(TemplateEngineHelper.CONFIGURATIONS, configList); //$NON-NLS-1$ - + if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) { return; } - - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); IFolder folder = project.getFolder(INCLUDE_FOLDER + 1); assertTrue(folder.exists()); @@ -84,24 +105,27 @@ public class TestProcesses extends TestCase { public void testNewManagedProject() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*NewManagedProject"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ - valueStore.put(TemplateEngineHelper.CONFIGURATIONS, configList); //$NON-NLS-1$ - + if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) { return; } - - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); } public void testSetMBSBooleanOptionValue() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*SetMBSBooleanOptionValue"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$ @@ -111,7 +135,7 @@ public class TestProcesses extends TestCase { return; } - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); try { assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.BOOLEAN, false); @@ -120,11 +144,13 @@ public class TestProcesses extends TestCase { } } - + public void testSetMBSStringOptionValue() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*SetMBSStringOptionValue"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$ @@ -135,7 +161,7 @@ public class TestProcesses extends TestCase { return; } - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); try { assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING, false); @@ -143,16 +169,18 @@ public class TestProcesses extends TestCase { fail(e.getMessage()); } } - + public void testSetMBSStringListOptionValues() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*SetMBSStringListOptionValues"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("id", MBS_GNU_CPP_LINK_OPTION_ID); //$NON-NLS-1$ - + for (int i=0; i < MBS_STRING_LIST_OPTION_VALUES.length; i++) { valueStore.put("StringListValue" + i, MBS_STRING_LIST_OPTION_VALUES[i]); //$NON-NLS-1$ } @@ -161,7 +189,7 @@ public class TestProcesses extends TestCase { return; } - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); try { assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING_LIST, false); @@ -169,11 +197,13 @@ public class TestProcesses extends TestCase { fail(e.getMessage()); } } - + public void testAppendToMBSStringOptionValue() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AppendToMBSStringOptionValue"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$ @@ -185,7 +215,7 @@ public class TestProcesses extends TestCase { return; } - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); try { assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING, true); @@ -193,11 +223,13 @@ public class TestProcesses extends TestCase { fail(e.getMessage()); } } - + public void testAppendToMBSStringListOptionValues() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AppendToMBSStringListOptionValues"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$ @@ -215,51 +247,54 @@ public class TestProcesses extends TestCase { return; } - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); try { assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING_LIST, true); + assertSetMBSOptionValues(project, ".*gnu.c.link.option.paths.*", IOption.LIBRARY_PATHS, true); } catch (BuildException e) { fail(e.getMessage()); } } - + public void testExcludeResources() { TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*ExcludeResources"); //$NON-NLS-1$ + template.getTemplateInfo().setConfigurations(getConfigurations()); + Map valueStore = template.getValueStore(); - valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$ + valueStore.put("projectName", projectName); //$NON-NLS-1$ valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$ valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$ - + for (int i=0; i < 3; i++) { valueStore.put("baseName" + i, "BaseName" + i); //$NON-NLS-1$ //$NON-NLS-2$ } - + valueStore.put("configIdPattern", RELEASE_CONFIG_ID); //$NON-NLS-1$ valueStore.put("filePatterns0", ".*BaseName0.*"); //Exlude BaseName0.* from Release config //$NON-NLS-1$ //$NON-NLS-2$ valueStore.put("filePatterns1", ".*BaseName1.*"); //Exlude BaseName1.* from all other configs except from Release config //$NON-NLS-1$ //$NON-NLS-2$ - + if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) { return; } - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME); + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); assertTrue(project.exists()); - + IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(project).getManagedProject().getConfigurations(); for(int i=0; i