diff options
author | Andrew Niefer | 2004-03-16 22:29:55 +0000 |
---|---|---|
committer | Andrew Niefer | 2004-03-16 22:29:55 +0000 |
commit | 49e276d0ac63628a96e1c425917fe9016d50c2fb (patch) | |
tree | 293590c2679d679147130c4628909040caef7dd4 /core/org.eclipse.cdt.core.tests | |
parent | 4c9e632ce6ac0536d8f8d7a146c5a76bdd7b9454 (diff) | |
download | org.eclipse.cdt-49e276d0ac63628a96e1c425917fe9016d50c2fb.tar.gz org.eclipse.cdt-49e276d0ac63628a96e1c425917fe9016d50c2fb.tar.xz org.eclipse.cdt-49e276d0ac63628a96e1c425917fe9016d50c2fb.zip |
managed build tests from Sean Evoy
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
3 files changed, 67 insertions, 52 deletions
diff --git a/core/org.eclipse.cdt.core.tests/ChangeLog b/core/org.eclipse.cdt.core.tests/ChangeLog index 3068ddb05b8..19f5e6c5af4 100644 --- a/core/org.eclipse.cdt.core.tests/ChangeLog +++ b/core/org.eclipse.cdt.core.tests/ChangeLog @@ -1,3 +1,12 @@ +2004-03-12 Sean Evoy
+ Corrected a target definition in the plugin manifest that was flagged
+ as release when it should have been flagged as test. Also updated the
+ tests to save the build information after changes that make the build
+ information dirty.
+
+ * plugin.xml
+ * build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
2004-03-16 Alain Magloire
Test from Thomas Fletcher for the Error Parser
diff --git a/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java b/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java index 0437600a395..aa6402c9124 100644 --- a/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java +++ b/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java @@ -41,7 +41,6 @@ import org.eclipse.cdt.managedbuilder.core.IOption; import org.eclipse.cdt.managedbuilder.core.IOptionCategory; import org.eclipse.cdt.managedbuilder.core.ITarget; import org.eclipse.cdt.managedbuilder.core.ITool; -import org.eclipse.cdt.managedbuilder.core.IToolReference; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature; import org.eclipse.cdt.managedbuilder.internal.core.OptionReference; @@ -176,6 +175,8 @@ public class ManagedBuildTests extends TestCase { targets[0].resetMakeCommand(); assertFalse(targets[0].hasOverridenMakeCommand()); assertEquals(oldMakeCmd, targets[0].getMakeCommand()); + + ManagedBuildManager.saveBuildInfo(project, false); } @@ -219,13 +220,15 @@ public class ManagedBuildTests extends TestCase { for (int i = 0; i < baseConfigs.length; ++i) { newTarget.createConfiguration(baseConfigs[i], baseConfigs[i].getId() + "." + i); } - // Change the default configuration to the sub config IConfiguration[] configs = newTarget.getConfigurations(); assertEquals(4, configs.length); IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project); buildInfo.setDefaultConfiguration(newTarget.getConfiguration(configs[0].getId())); + // Save the build info + ManagedBuildManager.saveBuildInfo(project, false); + // Use the plugin mechanism to discover the supplier of the path information IExtensionPoint extensionPoint = CCorePlugin.getDefault().getDescriptor().getExtensionPoint("ScannerInfoProvider"); if (extensionPoint == null) { @@ -315,7 +318,7 @@ public class ManagedBuildTests extends TestCase { // Open the test project IProject project = createProject(projectName); - // Make sure there is one and only one target with 2 configs + // Make sure there is one and only one target with 3 configs ITarget[] definedTargets = ManagedBuildManager.getTargets(project); assertEquals(1, definedTargets.length); ITarget rootTarget = definedTargets[0]; @@ -359,7 +362,7 @@ public class ManagedBuildTests extends TestCase { ManagedBuildManager.setOption(newConfig, options[1], enumVal); // Save, close, reopen and test again - ManagedBuildManager.saveBuildInfo(project); + ManagedBuildManager.saveBuildInfo(project, false); project.close(null); ManagedBuildManager.removeBuildInfo(project); project.open(null); @@ -378,6 +381,7 @@ public class ManagedBuildTests extends TestCase { assertEquals(3, definedConfigs.length); assertEquals(definedConfigs[0].getName(), rootName); assertEquals(definedConfigs[1].getName(), overrideName); + ManagedBuildManager.saveBuildInfo(project, false); } public void testConfigurationReset() { @@ -406,6 +410,7 @@ public class ManagedBuildTests extends TestCase { // Reset the config and retest ManagedBuildManager.resetConfiguration(project, defaultConfig); + ManagedBuildManager.saveBuildInfo(project, false); try { checkRootTarget(defaultTarget); } catch (BuildException e2) { @@ -474,7 +479,7 @@ public class ManagedBuildTests extends TestCase { assertEquals("z", options[0].getStringValue()); // Save, close, reopen and test again - ManagedBuildManager.saveBuildInfo(project); + ManagedBuildManager.saveBuildInfo(project, true); try { project.close(null); } catch (CoreException e) { @@ -1202,7 +1207,7 @@ public class ManagedBuildTests extends TestCase { rootTarget.setArtifactName(name); // Save, close, reopen and test again - ManagedBuildManager.saveBuildInfo(project); + ManagedBuildManager.saveBuildInfo(project, false); project.close(null); ManagedBuildManager.removeBuildInfo(project); project.open(null); diff --git a/core/org.eclipse.cdt.core.tests/plugin.xml b/core/org.eclipse.cdt.core.tests/plugin.xml index de1ac6b6019..c30a72873a1 100644 --- a/core/org.eclipse.cdt.core.tests/plugin.xml +++ b/core/org.eclipse.cdt.core.tests/plugin.xml @@ -33,12 +33,12 @@ point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo"> <tool natureFilter="both" - name="Target Independent Tool" sources="rc" + name="Target Independent Tool" headerExtensions="h" outputFlag="/fo" - command="RC.EXE" outputs="free" + command="RC.EXE" id="target.independent.tool"> <optionCategory owner="target.independent.tool" @@ -49,8 +49,8 @@ defaultValue="Live free or die" name="String in Free" category="indy.cat.free" - valueType="string" - id="org.eclipse.cdt.core.tests.option1"> + id="org.eclipse.cdt.core.tests.option1" + valueType="string"> </option> <optionCategory owner="indy.cat.free" @@ -61,8 +61,8 @@ defaultValue="false" name="Boolean in Chained" category="indy.cat.chained" - valueType="boolean" - id="org.eclipse.cdt.core.tests.option2"> + id="org.eclipse.cdt.core.tests.option2" + valueType="boolean"> </option> </tool> <target @@ -73,17 +73,17 @@ defaultExtension="toor" isAbstract="false" makeCommand="make" - binaryParser="org.eclipse.cdt.core.PE" makeFlags="-k" + binaryParser="org.eclipse.cdt.core.PE" osList="win32"> <tool natureFilter="cnature" - sources="foo,bar" name="Root Tool" + sources="foo,bar" headerExtensions="baz" outputFlag="-r" - outputs="toor" command="doIt" + outputs="toor" id="root.tool"> <optionCategory owner="root.tool" @@ -93,39 +93,39 @@ <option name="List Option in Top" command="-L" - valueType="stringList" - id="list.option"> + id="list.option" + valueType="stringList"> <listOptionValue value="a"> </listOptionValue> <listOptionValue - value="b" - builtIn="false"> + builtIn="false" + value="b"> </listOptionValue> <listOptionValue - value="c" - builtIn="true"> + builtIn="true" + value="c"> </listOptionValue> </option> <option defaultValue="false" name="Boolean Option in Top" command="-b" - valueType="boolean" - id="boolean.option"> + id="boolean.option" + valueType="boolean"> </option> <option defaultValue="x" name="String Option in Category" category="category" - valueType="string" - id="string.option"> + id="string.option" + valueType="string"> </option> <option name="Enumerated Option in Category" category="category" - valueType="enumerated" - id="enumerated.option"> + id="enumerated.option" + valueType="enumerated"> <enumeratedOptionValue name="Default Enum" isDefault="true" @@ -198,17 +198,17 @@ </configuration> <tool natureFilter="both" - sources="yarf" name="Sub Tool" + sources="yarf" headerExtensions="arf,barf" - outputs="bus" outputPrefix="lib" + outputs="bus" id="tool.sub"> <option name="Include Paths" command="-I" - valueType="includePath" - id="sub.tool.opt.inc.paths"> + id="sub.tool.opt.inc.paths" + valueType="includePath"> <listOptionValue value="/usr/include"> </listOptionValue> @@ -216,45 +216,45 @@ value="/opt/gnome/include"> </listOptionValue> <listOptionValue - value="/usr/gnu/include" - builtIn="true"> + builtIn="true" + value="/usr/gnu/include"> </listOptionValue> </option> <option name="Defined Symbols" command="-D" - valueType="definedSymbols" - id="sub.tool.opt.def.symbols"> + id="sub.tool.opt.def.symbols" + valueType="definedSymbols"> <listOptionValue - value="BUILTIN" - builtIn="true"> + builtIn="true" + value="BUILTIN"> </listOptionValue> </option> <option name="More Includes" command="-I" - valueType="includePath" - id="sub.tool.opts.inc.paths.more"> + id="sub.tool.opts.inc.paths.more" + valueType="includePath"> <listOptionValue - value="C:\home\tester/include" - builtIn="false"> + builtIn="false" + value="C:\home\tester/include"> </listOptionValue> <listOptionValue - value=""../includes"" - builtIn="false"> + builtIn="false" + value=""../includes""> </listOptionValue> </option> <option name="User Objects" - valueType="userObjs" - id="sub.tool.opt.objs"> + id="sub.tool.opt.objs" + valueType="userObjs"> <listOptionValue - value="obj1.o" - builtIn="false"> + builtIn="false" + value="obj1.o"> </listOptionValue> <listOptionValue - value="obj2.o" - builtIn="false"> + builtIn="false" + value="obj2.o"> </listOptionValue> </option> </tool> @@ -262,8 +262,8 @@ <target isTest="true" name="Test Sub Sub" - parent="test.sub" binaryParser="org.eclipse.cdt.core.ELF" + parent="test.sub" defaultExtension="tss" makeCommand="nmake" id="test.sub.sub"> @@ -272,9 +272,10 @@ </toolReference> </target> <target + isTest="true" name="Forward Grandchild" - parent="test.forward.child.target" binaryParser="org.eclipse.cdt.core.tests.target1" + parent="test.forward.child.target" id="test.forward.grandchild.target"> <toolReference command="newcommand" @@ -285,8 +286,8 @@ isTest="true" osList="win32,solaris,linux" name="Forward Child" - binaryParser="org.eclipse.cdt.core.tests.target2" parent="test.forward.parent.target" + binaryParser="org.eclipse.cdt.core.tests.target2" id="test.forward.child.target"> <toolReference id="test.forward.tool"> |