Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Evoy2004-05-04 11:06:54 -0400
committerSean Evoy2004-05-04 11:06:54 -0400
commitf971a5046cfd7059e61440a36fa9cb536cc86ba9 (patch)
tree884076612bd2010ac3ecc7c927897f2672e20ab2 /build/org.eclipse.cdt.managedbuilder.core.tests
parent43e38ae75cd87a8e57eb862214c1cadbb06f00d1 (diff)
downloadorg.eclipse.cdt-f971a5046cfd7059e61440a36fa9cb536cc86ba9.tar.gz
org.eclipse.cdt-f971a5046cfd7059e61440a36fa9cb536cc86ba9.tar.xz
org.eclipse.cdt-f971a5046cfd7059e61440a36fa9cb536cc86ba9.zip
Changed the toolchain specification for Gnu tools to add a generic set of target definitions for POSIX targets. There is also a redefined set of tools and options. There is also a conversion routine that runs on workspace startup to convert older projects into the newer format.
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core.tests')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml9
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java14
2 files changed, 15 insertions, 8 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml
index 63b8ed85d28..485f300db43 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml
@@ -60,7 +60,7 @@
defaultExtension="toor"
isAbstract="false"
makeCommand="make"
- makeFlags="-k"
+ makeArguments="-k"
binaryParser="org.eclipse.cdt.core.PE"
osList="win32">
<tool
@@ -182,7 +182,7 @@
id="boolean.false.option">
</optionReference>
<optionReference
- defaultValue="-e2"
+ defaultValue="another.enum.option"
id="enumerated.option">
</optionReference>
<optionReference
@@ -208,7 +208,7 @@
defaultExtension="bus"
isAbstract="false"
binaryParser="org.eclipse.cdt.core.PE"
- makeFlags="-d"
+ makeArguments="-d"
parent="test.root"
osList="win32,linux,solaris">
<configuration
@@ -294,6 +294,7 @@
</toolReference>
</target>
<dynamicElementProvider
+ name="Test Target Provider"
class="org.eclipse.cdt.managedbuild.core.tests.TestManagedConfigProvider">
</dynamicElementProvider>
<target
@@ -364,6 +365,8 @@
id="error.parsers.tool">
</tool>
</target>
+ <!-- The old tool definitions exercised the model differently, so keep an example around for testing -->
+
</extension>
</plugin>
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java
index b709b97bc3f..51ce76b1a56 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java
@@ -844,11 +844,15 @@ public class ManagedBuildCoreTests extends TestCase {
// Next option is an enumerated
assertEquals("Enumerated Option in Category", options[4].getName());
assertEquals(IOption.ENUMERATED, options[4].getValueType());
- assertEquals("Default Enum", options[4].getSelectedEnum());
+ // Post-2.0 enums store the ID, not the string value
+ assertEquals("default.enum.option", options[4].getSelectedEnum());
+ assertEquals("-e1", options[4].getEnumCommand("default.enum.option"));
+ // Need this methof to populate the UI selection widget
valueList = options[4].getApplicableValues();
assertEquals(2, valueList.length);
assertEquals("Default Enum", valueList[0]);
assertEquals("Another Enum", valueList[1]);
+ // Test compatability with 1.2 scheme of getting the command from the name
assertEquals("-e1", options[4].getEnumCommand(valueList[0]));
assertEquals("-e2", options[4].getEnumCommand(valueList[1]));
// Final option is another boolean
@@ -986,13 +990,13 @@ public class ManagedBuildCoreTests extends TestCase {
assertTrue(options[2] instanceof OptionReference);
assertEquals("Enumerated Option in Category", options[2].getName());
assertEquals(IOption.ENUMERATED, options[2].getValueType());
- assertEquals("-e2", options[2].getSelectedEnum());
+ assertEquals("another.enum.option", options[2].getSelectedEnum());
assertTrue(options[3] instanceof OptionReference);
assertEquals("Boolean Option in Category", options[3].getName());
assertEquals(IOption.BOOLEAN, options[3].getValueType());
assertEquals(true, options[3].getBooleanValue());
tool = tools[0];
- assertEquals("-Ld -Le -Lf -b overridden -stralsooverridden", tool.getToolFlags());
+ assertEquals("-Ld -Le -Lf -b overridden -stralsooverridden -e2", tool.getToolFlags());
}
/*
@@ -1186,7 +1190,7 @@ public class ManagedBuildCoreTests extends TestCase {
assertNotNull(parentTool);
// check option categories
- IOption option = parentTool.getOption("test.forward.option");
+ IOption option = parentTool.getOptionById("test.forward.option");
assertNotNull(option);
IOptionCategory[] firstLevel = parentTool.getTopOptionCategory()
.getChildCategories();
@@ -1206,7 +1210,7 @@ public class ManagedBuildCoreTests extends TestCase {
// get and check the option reference
OptionReference optRef = (OptionReference)
- childToolRef.getOption("test.forward.option");
+ childToolRef.getOptionById("test.forward.option");
assertEquals(option, optRef.getOption());
// get the tool reference from the grandchild

Back to the top