mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for Sean Evoy : Removing Managed Build Tests from core tests.
This commit is contained in:
parent
2852cc63c2
commit
24762334f5
7 changed files with 3 additions and 1831 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2004-04-23 Hoda Amer
|
||||||
|
Patch for Sean Evoy : Removing Managed Build Tests from core tests.
|
||||||
|
|
||||||
2004-04-22 John Camelon
|
2004-04-22 John Camelon
|
||||||
Added CompleteParseASTTest:testBug47926().
|
Added CompleteParseASTTest:testBug47926().
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,69 +0,0 @@
|
||||||
/**********************************************************************
|
|
||||||
* Copyright (c) 2004 TimeSys Corporation and others.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Common Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/cpl-v10.html
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* TimeSys Corporation - Initial API and implementation
|
|
||||||
**********************************************************************/
|
|
||||||
package org.eclipse.cdt.core.build.managed.tests;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
|
|
||||||
|
|
||||||
public class TestConfigElement implements IManagedConfigElement {
|
|
||||||
|
|
||||||
private String name;
|
|
||||||
private Map attributeMap;
|
|
||||||
private IManagedConfigElement[] children;
|
|
||||||
|
|
||||||
public TestConfigElement(String name, String[][] attributes,
|
|
||||||
IManagedConfigElement[] children) {
|
|
||||||
this.name = name;
|
|
||||||
this.children = children;
|
|
||||||
this.attributeMap = new TreeMap();
|
|
||||||
for (int i = 0; i < attributes.length; i++) {
|
|
||||||
attributeMap.put(attributes[i][0], attributes[i][1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getName()
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getAttribute(java.lang.String)
|
|
||||||
*/
|
|
||||||
public String getAttribute(String name) {
|
|
||||||
return (String)attributeMap.get(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getChildren()
|
|
||||||
*/
|
|
||||||
public IManagedConfigElement[] getChildren() {
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getChildren(java.lang.String)
|
|
||||||
*/
|
|
||||||
public IManagedConfigElement[] getChildren(String elementName) {
|
|
||||||
List ret = new ArrayList(children.length);
|
|
||||||
for (int i = 0; i < children.length; i++) {
|
|
||||||
if (children[i].getName().equals(elementName)) {
|
|
||||||
ret.add(children[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (IManagedConfigElement[])ret.toArray(new IManagedConfigElement[ret.size()]);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,67 +0,0 @@
|
||||||
/**********************************************************************
|
|
||||||
* Copyright (c) 2004 TimeSys Corporation and others.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Common Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/cpl-v10.html
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* TimeSys Corporation - Initial API and implementation
|
|
||||||
**********************************************************************/
|
|
||||||
package org.eclipse.cdt.core.build.managed.tests;
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElementProvider;
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.ITarget;
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.ITool;
|
|
||||||
|
|
||||||
public class TestManagedConfigProvider implements IManagedConfigElementProvider {
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedConfigProvider#getConfigElements()
|
|
||||||
*/
|
|
||||||
public IManagedConfigElement[] getConfigElements() {
|
|
||||||
try {
|
|
||||||
Properties props = new Properties();
|
|
||||||
props.load(getClass().getResourceAsStream("test_commands"));
|
|
||||||
IManagedConfigElement[] ret = new IManagedConfigElement[props.size()];
|
|
||||||
Iterator it = props.keySet().iterator();
|
|
||||||
int i = 0;
|
|
||||||
while (it.hasNext()) {
|
|
||||||
String targetId = (String)it.next();
|
|
||||||
String command = props.getProperty(targetId);
|
|
||||||
ret[i++] = createTarget(targetId, command);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
} catch (Exception ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
return new IManagedConfigElement[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
private IManagedConfigElement createTarget(String targetId, String command) {
|
|
||||||
IManagedConfigElement toolRef = new TestConfigElement(
|
|
||||||
IConfiguration.TOOLREF_ELEMENT_NAME,
|
|
||||||
new String[][] {
|
|
||||||
{ITool.ID, "test.forward.tool"},
|
|
||||||
{ITool.COMMAND, command}},
|
|
||||||
new IManagedConfigElement[0]);
|
|
||||||
|
|
||||||
IManagedConfigElement target = new TestConfigElement(
|
|
||||||
ITarget.TARGET_ELEMENT_NAME,
|
|
||||||
new String[][] {
|
|
||||||
{ITarget.ID, targetId},
|
|
||||||
{ITarget.NAME, targetId.substring(targetId.lastIndexOf('.')+1).
|
|
||||||
replace('_', ' ')},
|
|
||||||
{ITarget.PARENT, "test.forward.parent.target"},
|
|
||||||
{ITarget.IS_TEST, "true"},
|
|
||||||
{ITarget.OS_LIST, "win32,linux,solaris"}},
|
|
||||||
new IManagedConfigElement[] {toolRef});
|
|
||||||
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
test.provider.Test_One=cmd1
|
|
||||||
test.provider.Test_Two=cmd2
|
|
||||||
test.provider.Test_Three=cmd
|
|
|
@ -25,341 +25,6 @@
|
||||||
<import plugin="org.eclipse.core.runtime.compatibility"/>
|
<import plugin="org.eclipse.core.runtime.compatibility"/>
|
||||||
</requires>
|
</requires>
|
||||||
|
|
||||||
|
|
||||||
<extension
|
|
||||||
id="buildTest"
|
|
||||||
name="Tools for Build Test"
|
|
||||||
point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo">
|
|
||||||
<tool
|
|
||||||
natureFilter="both"
|
|
||||||
name="Target Independent Tool"
|
|
||||||
sources="rc"
|
|
||||||
headerExtensions="h"
|
|
||||||
outputFlag="/fo"
|
|
||||||
command="RC.EXE"
|
|
||||||
outputs="free"
|
|
||||||
id="target.independent.tool">
|
|
||||||
<optionCategory
|
|
||||||
owner="target.independent.tool"
|
|
||||||
name="Free"
|
|
||||||
id="indy.cat.free">
|
|
||||||
</optionCategory>
|
|
||||||
<option
|
|
||||||
defaultValue="Live free or die"
|
|
||||||
name="String in Free"
|
|
||||||
category="indy.cat.free"
|
|
||||||
valueType="string"
|
|
||||||
id="org.eclipse.cdt.core.tests.option1">
|
|
||||||
</option>
|
|
||||||
<optionCategory
|
|
||||||
owner="indy.cat.free"
|
|
||||||
name="Chained"
|
|
||||||
id="indy.cat.chained">
|
|
||||||
</optionCategory>
|
|
||||||
<option
|
|
||||||
defaultValue="false"
|
|
||||||
name="Boolean in Chained"
|
|
||||||
category="indy.cat.chained"
|
|
||||||
valueType="boolean"
|
|
||||||
id="org.eclipse.cdt.core.tests.option2">
|
|
||||||
</option>
|
|
||||||
</tool>
|
|
||||||
<target
|
|
||||||
name="Test Root"
|
|
||||||
id="test.root"
|
|
||||||
cleanCommand="del /myworld"
|
|
||||||
isTest="true"
|
|
||||||
defaultExtension="toor"
|
|
||||||
isAbstract="false"
|
|
||||||
makeCommand="make"
|
|
||||||
binaryParser="org.eclipse.cdt.core.PE"
|
|
||||||
makeFlags="-k"
|
|
||||||
osList="win32">
|
|
||||||
<tool
|
|
||||||
natureFilter="cnature"
|
|
||||||
sources="foo,bar"
|
|
||||||
name="Root Tool"
|
|
||||||
headerExtensions="baz"
|
|
||||||
outputFlag="-r"
|
|
||||||
outputs="toor"
|
|
||||||
command="doIt"
|
|
||||||
id="root.tool">
|
|
||||||
<optionCategory
|
|
||||||
owner="root.tool"
|
|
||||||
name="Category"
|
|
||||||
id="category">
|
|
||||||
</optionCategory>
|
|
||||||
<option
|
|
||||||
name="List Option in Top"
|
|
||||||
command="-L"
|
|
||||||
valueType="stringList"
|
|
||||||
id="list.option">
|
|
||||||
<listOptionValue
|
|
||||||
value="a">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value="b"
|
|
||||||
builtIn="false">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value="c"
|
|
||||||
builtIn="true">
|
|
||||||
</listOptionValue>
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
defaultValue="false"
|
|
||||||
name="Boolean Option in Top"
|
|
||||||
command="-b"
|
|
||||||
valueType="boolean"
|
|
||||||
id="boolean.option">
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
defaultValue="x"
|
|
||||||
name="String Option in Category"
|
|
||||||
category="category"
|
|
||||||
valueType="string"
|
|
||||||
id="string.option">
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
defaultValue=""
|
|
||||||
name="Another String Option in Category"
|
|
||||||
category="category"
|
|
||||||
command="-str"
|
|
||||||
id="another.string.option"
|
|
||||||
valueType="string">
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
name="Enumerated Option in Category"
|
|
||||||
category="category"
|
|
||||||
valueType="enumerated"
|
|
||||||
id="enumerated.option">
|
|
||||||
<enumeratedOptionValue
|
|
||||||
name="Default Enum"
|
|
||||||
isDefault="true"
|
|
||||||
command="-e1"
|
|
||||||
id="default.enum.option">
|
|
||||||
</enumeratedOptionValue>
|
|
||||||
<enumeratedOptionValue
|
|
||||||
name="Another Enum"
|
|
||||||
command="-e2"
|
|
||||||
id="another.enum.option">
|
|
||||||
</enumeratedOptionValue>
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
commandFalse="-nob"
|
|
||||||
name="Boolean Option in Category"
|
|
||||||
category="category"
|
|
||||||
id="boolean.false.option"
|
|
||||||
valueType="boolean">
|
|
||||||
</option>
|
|
||||||
</tool>
|
|
||||||
<configuration
|
|
||||||
name="Root Config"
|
|
||||||
id="root.config">
|
|
||||||
</configuration>
|
|
||||||
<configuration
|
|
||||||
name="Root Override Config"
|
|
||||||
id="root.override.config">
|
|
||||||
<toolReference
|
|
||||||
id="root.tool">
|
|
||||||
<optionReference
|
|
||||||
defaultValue="y"
|
|
||||||
id="string.option">
|
|
||||||
</optionReference>
|
|
||||||
<optionReference
|
|
||||||
defaultValue="true"
|
|
||||||
id="boolean.option">
|
|
||||||
</optionReference>
|
|
||||||
</toolReference>
|
|
||||||
</configuration>
|
|
||||||
<configuration
|
|
||||||
name="Complete Override Config"
|
|
||||||
id="complete.override.config">
|
|
||||||
<toolReference
|
|
||||||
id="root.tool">
|
|
||||||
<optionReference
|
|
||||||
defaultValue="overridden"
|
|
||||||
id="string.option">
|
|
||||||
</optionReference>
|
|
||||||
<optionReference
|
|
||||||
defaultValue="alsooverridden"
|
|
||||||
id="another.string.option">
|
|
||||||
</optionReference>
|
|
||||||
<optionReference
|
|
||||||
defaultValue="true"
|
|
||||||
id="boolean.option">
|
|
||||||
</optionReference>
|
|
||||||
<optionReference
|
|
||||||
defaultValue="true"
|
|
||||||
id="boolean.false.option">
|
|
||||||
</optionReference>
|
|
||||||
<optionReference
|
|
||||||
defaultValue="-e2"
|
|
||||||
id="enumerated.option">
|
|
||||||
</optionReference>
|
|
||||||
<optionReference
|
|
||||||
id="list.option">
|
|
||||||
<listOptionValue
|
|
||||||
value="d">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value="e">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value="f">
|
|
||||||
</listOptionValue>
|
|
||||||
</optionReference>
|
|
||||||
</toolReference>
|
|
||||||
</configuration>
|
|
||||||
</target>
|
|
||||||
<target
|
|
||||||
name="Test Sub"
|
|
||||||
id="test.sub"
|
|
||||||
cleanCommand="rm -yourworld"
|
|
||||||
isTest="true"
|
|
||||||
defaultExtension="bus"
|
|
||||||
isAbstract="false"
|
|
||||||
binaryParser="org.eclipse.cdt.core.PE"
|
|
||||||
makeFlags="-d"
|
|
||||||
parent="test.root"
|
|
||||||
osList="win32,linux,solaris">
|
|
||||||
<configuration
|
|
||||||
name="Sub Config"
|
|
||||||
id="sub.config">
|
|
||||||
</configuration>
|
|
||||||
<tool
|
|
||||||
natureFilter="both"
|
|
||||||
sources="yarf"
|
|
||||||
name="Sub Tool"
|
|
||||||
headerExtensions="arf,barf"
|
|
||||||
outputs="bus"
|
|
||||||
outputPrefix="lib"
|
|
||||||
id="tool.sub">
|
|
||||||
<option
|
|
||||||
name="Include Paths"
|
|
||||||
command="-I"
|
|
||||||
browseType="directory"
|
|
||||||
valueType="includePath"
|
|
||||||
id="sub.tool.opt.inc.paths">
|
|
||||||
<listOptionValue
|
|
||||||
value="/usr/include">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value="/opt/gnome/include">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value="/usr/gnu/include"
|
|
||||||
builtIn="true">
|
|
||||||
</listOptionValue>
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
name="Defined Symbols"
|
|
||||||
command="-D"
|
|
||||||
valueType="definedSymbols"
|
|
||||||
id="sub.tool.opt.def.symbols">
|
|
||||||
<listOptionValue
|
|
||||||
value="BUILTIN"
|
|
||||||
builtIn="true">
|
|
||||||
</listOptionValue>
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
name="More Includes"
|
|
||||||
command="-I"
|
|
||||||
browseType="directory"
|
|
||||||
valueType="includePath"
|
|
||||||
id="sub.tool.opts.inc.paths.more">
|
|
||||||
<listOptionValue
|
|
||||||
value="C:\home\tester/include"
|
|
||||||
builtIn="false">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value=""../includes""
|
|
||||||
builtIn="false">
|
|
||||||
</listOptionValue>
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
name="User Objects"
|
|
||||||
browseType="file"
|
|
||||||
valueType="userObjs"
|
|
||||||
id="sub.tool.opt.objs">
|
|
||||||
<listOptionValue
|
|
||||||
value="obj1.o"
|
|
||||||
builtIn="false">
|
|
||||||
</listOptionValue>
|
|
||||||
<listOptionValue
|
|
||||||
value="obj2.o"
|
|
||||||
builtIn="false">
|
|
||||||
</listOptionValue>
|
|
||||||
</option>
|
|
||||||
</tool>
|
|
||||||
</target>
|
|
||||||
<target
|
|
||||||
isTest="true"
|
|
||||||
name="Test Sub Sub"
|
|
||||||
parent="test.sub"
|
|
||||||
binaryParser="org.eclipse.cdt.core.ELF"
|
|
||||||
defaultExtension="tss"
|
|
||||||
makeCommand="nmake"
|
|
||||||
id="test.sub.sub">
|
|
||||||
<toolReference
|
|
||||||
id="target.independent.tool">
|
|
||||||
</toolReference>
|
|
||||||
</target>
|
|
||||||
<dynamicElementProvider
|
|
||||||
class="org.eclipse.cdt.core.build.managed.tests.TestManagedConfigProvider">
|
|
||||||
</dynamicElementProvider>
|
|
||||||
<target
|
|
||||||
isTest="true"
|
|
||||||
name="Forward Grandchild"
|
|
||||||
parent="test.forward.child.target"
|
|
||||||
binaryParser="org.eclipse.cdt.core.tests.target1"
|
|
||||||
id="test.forward.grandchild.target">
|
|
||||||
<toolReference
|
|
||||||
command="newcommand"
|
|
||||||
id="test.forward.tool">
|
|
||||||
</toolReference>
|
|
||||||
</target>
|
|
||||||
<target
|
|
||||||
isTest="true"
|
|
||||||
osList="win32,solaris,linux"
|
|
||||||
name="Forward Child"
|
|
||||||
binaryParser="org.eclipse.cdt.core.tests.target2"
|
|
||||||
parent="test.forward.parent.target"
|
|
||||||
id="test.forward.child.target">
|
|
||||||
<toolReference
|
|
||||||
id="test.forward.tool">
|
|
||||||
<optionReference
|
|
||||||
id="test.forward.option">
|
|
||||||
</optionReference>
|
|
||||||
</toolReference>
|
|
||||||
</target>
|
|
||||||
<target
|
|
||||||
isTest="true"
|
|
||||||
name="Forward Parent"
|
|
||||||
binaryParser="org.eclipse.cdt.core.tests.target3"
|
|
||||||
id="test.forward.parent.target">
|
|
||||||
<tool
|
|
||||||
natureFilter="both"
|
|
||||||
name="Forward Parent Tool"
|
|
||||||
id="test.forward.tool">
|
|
||||||
<option
|
|
||||||
name="Test Forward Option"
|
|
||||||
category="test.forward.child.category"
|
|
||||||
id="test.forward.option">
|
|
||||||
</option>
|
|
||||||
<optionCategory
|
|
||||||
owner="test.forward.parent.category"
|
|
||||||
name="Forward Child Category"
|
|
||||||
id="test.forward.child.category">
|
|
||||||
</optionCategory>
|
|
||||||
<optionCategory
|
|
||||||
owner="test.forward.tool"
|
|
||||||
name="Forward Parent Category"
|
|
||||||
id="test.forward.parent.category">
|
|
||||||
</optionCategory>
|
|
||||||
</tool>
|
|
||||||
</target>
|
|
||||||
</extension>
|
|
||||||
<extension
|
<extension
|
||||||
id="runTests"
|
id="runTests"
|
||||||
point="org.eclipse.core.runtime.applications">
|
point="org.eclipse.core.runtime.applications">
|
||||||
|
|
|
@ -9,7 +9,6 @@ package org.eclipse.cdt.core.suite;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.build.managed.tests.ManagedBuildTests;
|
|
||||||
import org.eclipse.cdt.core.build.managed.tests.StandardBuildTests;
|
import org.eclipse.cdt.core.build.managed.tests.StandardBuildTests;
|
||||||
import org.eclipse.cdt.core.cdescriptor.tests.CDescriptorTests;
|
import org.eclipse.cdt.core.cdescriptor.tests.CDescriptorTests;
|
||||||
import org.eclipse.cdt.core.indexer.tests.DependencyTests;
|
import org.eclipse.cdt.core.indexer.tests.DependencyTests;
|
||||||
|
@ -51,7 +50,6 @@ public class AutomatedIntegrationSuite extends TestSuite {
|
||||||
|
|
||||||
// Add all success tests
|
// Add all success tests
|
||||||
suite.addTest(CDescriptorTests.suite());
|
suite.addTest(CDescriptorTests.suite());
|
||||||
suite.addTest(ManagedBuildTests.suite());
|
|
||||||
suite.addTest(StandardBuildTests.suite());
|
suite.addTest(StandardBuildTests.suite());
|
||||||
suite.addTest(ParserTestSuite.suite());
|
suite.addTest(ParserTestSuite.suite());
|
||||||
suite.addTest(AllCoreTests.suite());
|
suite.addTest(AllCoreTests.suite());
|
||||||
|
|
Loading…
Add table
Reference in a new issue