diff options
author | Mikhail Sennikovsky | 2007-06-05 13:47:26 +0000 |
---|---|---|
committer | Mikhail Sennikovsky | 2007-06-05 13:47:26 +0000 |
commit | 3b2085290f79e4a02d4011ec6cff09ff218ad1db (patch) | |
tree | 5af85fd4dd84dcca3dce531ee9071a7af9b77d09 /build/org.eclipse.cdt.managedbuilder.core.tests | |
parent | 781426f7b8bfe415e68e845f4a661f59e1e1c649 (diff) | |
download | org.eclipse.cdt-3b2085290f79e4a02d4011ec6cff09ff218ad1db.tar.gz org.eclipse.cdt-3b2085290f79e4a02d4011ec6cff09ff218ad1db.tar.xz org.eclipse.cdt-3b2085290f79e4a02d4011ec6cff09ff218ad1db.zip |
1. language setting entries calculation fixes
2. test updates
3. CDt variables fixes
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core.tests')
9 files changed, 2862 insertions, 11 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml index 9d362d9e054..f586cfa026d 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml @@ -6698,4 +6698,2118 @@ projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/> </extension> + <!-- 4.0 tests --> + <extension + id="test.four.dot.zero.cdt.managed.build.info" + name="Managed Build Tools Description" + point="org.eclipse.cdt.managedbuilder.core.buildDefinitions"> + <managedBuildRevision + fileVersion="4.0.0"> + </managedBuildRevision> + <tool + natureFilter="cnature" + name="%ToolName.linker.gnu.c" + outputFlag="-o" + isSystem="false" + command="gcc" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker" + errorParsers="org.eclipse.cdt.core.GLDErrorParser"> + <supportedProperties> + <property id="org.eclipse.cdt.build.core.buildArtefactType"> + <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/> + <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/> + </property> + </supportedProperties> + <envVarBuildPath + pathType="buildpathLibrary" + variableList="LIBRARY_PATH"> + </envVarBuildPath> + + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker" + name="%OptionCategory.General" + id="test.gnu.c.link.category.general"> + </optionCategory> + <option + defaultValue="false" + name="%Option.Posix.Linker.NoStartFiles" + category="test.gnu.c.link.category.general" + command="-nostartfiles" + id="test.gnu.c.link.option.nostart" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="%Option.Posix.Linker.NoDefLibs" + category="test.gnu.c.link.category.general" + command="-nodefaultlibs" + id="test.gnu.c.link.option.nodeflibs" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="%Option.Posix.Linker.NoStdLibs" + category="test.gnu.c.link.category.general" + command="-nostdlib" + id="test.gnu.c.link.option.nostdlibs" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="%Option.Posix.Linker.Strip" + category="test.gnu.c.link.category.general" + command="-s" + id="test.gnu.c.link.option.strip" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="%Option.Posix.Linker.Static" + category="test.gnu.c.link.category.general" + command="-static" + id="test.gnu.c.link.option.noshared" + valueType="boolean"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker" + name="%OptionCategory.Libs" + id="test.gnu.c.link.category.libs"> + </optionCategory> + <option + name="%Option.Posix.Libs" + category="test.gnu.c.link.category.libs" + command="-l" + id="test.gnu.c.link.option.libs" + browseType="none" + valueType="libs"> + </option> + <option + name="%Option.Posix.Libsearch" + category="test.gnu.c.link.category.libs" + command="-L" + id="test.gnu.c.link.option.paths" + browseType="directory" + valueType="libPaths"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker" + name="%OptionCategory.Misc" + id="test.gnu.c.link.category.other"> + </optionCategory> + <option + name="%Option.Posix.Linker.Flags" + category="test.gnu.c.link.category.other" + valueType="string" + id="test.gnu.c.link.option.ldflags"> + </option> + <option + name="%Option.Posix.Linker.XLinker" + category="test.gnu.c.link.category.other" + command="-Xlinker ${VALUE}" + valueType="stringList" + id="test.gnu.c.link.option.other"> + </option> + <option + name="Test 4.0 Option.Posix.UserObjs" + category="test.gnu.c.link.category.other" + browseType="file" + valueType="userObjs" + id="test.gnu.c.link.option.userobjs"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker" + name="Test 4.0 OptionCategory.Shared.Settings" + id="test.gnu.c.link.category.shared"> + </optionCategory> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Linker.Shared" + category="test.gnu.c.link.category.shared" + command="-shared" + id="test.gnu.c.link.option.shared" + valueType="boolean"> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="defaultValue" + value="true" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/> + </enablement> + </option> + <option + name="Test 4.0 Option.Posix.Linker.SOName" + category="test.gnu.c.link.category.shared" + command="-Wl,-soname=" + id="test.gnu.c.link.option.soname" + valueType="string"> + </option> + <option + name="Test 4.0 Option.Posix.Linker.Implib" + category="test.gnu.c.link.category.shared" + command="-Wl,--out-implib=" + id="test.gnu.c.link.option.implname" + valueType="string"> + </option> + <option + name="Test 4.0 Option.Posix.Linker.Defname" + category="test.gnu.c.link.category.shared" + command="-Wl,--output-def=" + id="test.gnu.c.link.option.defname" + valueType="string"> + </option> + <inputType + sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile" + sources="o" + multipleOfType="true" + dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator" + buildVariable="OBJS" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.input"> + <additionalInput + paths="$(USER_OBJS)" + kind="additionalinputdependency"> + </additionalInput> + <additionalInput + paths="$(LIBS)" + kind="additionalinput"> + </additionalInput> + </inputType> + <outputType + outputs="" + buildVariable="EXECUTABLES" + nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output"> + <enablement + type="ALL"> + <checkOption + optionId="test.gnu.c.link.option.shared" + value="false"/> + </enablement> + </outputType> + <outputType + outputs="so" + outputPrefix="lib" + nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider" + buildVariable="LIBRARIES" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so"> + <enablement + type="ALL"> + <checkOption + optionId="test.gnu.c.link.option.shared" + value="true"/> + </enablement> + </outputType> + </tool> + <tool + natureFilter="ccnature" + name="Test 4.0 ToolName.linker.gnu.cpp" + isSystem="false" + outputFlag="-o" + command="g++" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker" + errorParsers="org.eclipse.cdt.core.GLDErrorParser"> + <supportedProperties> + <property id="org.eclipse.cdt.build.core.buildArtefactType"> + <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/> + <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/> + </property> + </supportedProperties> + <envVarBuildPath + pathType="buildpathLibrary" + variableList="LIBRARY_PATH"> + </envVarBuildPath> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker" + name="Test 4.0 OptionCategory.General" + id="test.gnu.cpp.link.category.options"> + </optionCategory> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Linker.NoStartFiles" + category="test.gnu.cpp.link.category.options" + command="-nostartfiles" + id="test.gnu.cpp.link.option.nostart" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Linker.NoDefLibs" + category="test.gnu.cpp.link.category.options" + command="-nodefaultlibs" + id="test.gnu.cpp.link.option.nodeflibs" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Linker.NoStdLibs" + category="test.gnu.cpp.link.category.options" + command="-nostdlib" + id="test.gnu.cpp.link.option.nostdlibs" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Linker.Strip" + category="test.gnu.cpp.link.category.options" + command="-s" + id="test.gnu.cpp.link.option.strip" + valueType="boolean"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker" + name="Test 4.0 OptionCategory.Libs" + id="test.gnu.cpp.link.category.libs"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.Libs" + category="test.gnu.cpp.link.category.libs" + command="-l" + id="test.gnu.cpp.link.option.libs" + browseType="none" + valueType="libs"> + </option> + <option + name="Test 4.0 Option.Posix.Libsearch" + category="test.gnu.cpp.link.category.libs" + command="-L" + id="test.gnu.cpp.link.option.paths" + browseType="directory" + valueType="libPaths"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker" + name="Test 4.0 OptionCategory.Misc" + id="test.gnu.cpp.link.category.other"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.Linker.Flags" + category="test.gnu.cpp.link.category.other" + valueType="string" + id="test.gnu.cpp.link.option.flags"> + </option> + <option + name="Test 4.0 Option.Posix.Linker.XLinker" + category="test.gnu.cpp.link.category.other" + command="-Xlinker ${VALUE}" + valueType="stringList" + id="test.gnu.cpp.link.option.other"> + </option> + <option + name="Test 4.0 Option.Posix.UserObjs" + category="test.gnu.cpp.link.category.other" + browseType="file" + valueType="userObjs" + id="test.gnu.cpp.link.option.userobjs"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker" + name="Test 4.0 OptionCategory.Shared.Settings" + id="test.gnu.cpp.link.category.shared"> + </optionCategory> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Linker.Shared" + category="test.gnu.cpp.link.category.shared" + command="-shared" + valueType="boolean" + id="test.gnu.cpp.link.option.shared"> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="defaultValue" + value="true" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/> + </enablement> + </option> + <option + name="Test 4.0 Option.Posix.Linker.SOName" + category="test.gnu.cpp.link.category.shared" + command="-Wl,-soname=" + valueType="string" + id="test.gnu.cpp.link.option.soname"> + </option> + <option + name="Test 4.0 Option.Posix.Linker.Implib" + category="test.gnu.cpp.link.category.shared" + command="-Wl,--out-implib=" + valueType="string" + id="test.gnu.cpp.link.option.implname"> + </option> + <option + name="Test 4.0 Option.Posix.Linker.Defname" + category="test.gnu.cpp.link.category.shared" + command="-Wl,--output-def=" + valueType="string" + id="test.gnu.cpp.link.option.defname"> + </option> + <inputType + sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile" + sources="o" + multipleOfType="true" + dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator" + buildVariable="OBJS" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.input"> + <additionalInput + paths="$(USER_OBJS)" + kind="additionalinputdependency"> + </additionalInput> + <additionalInput + paths="$(LIBS)" + kind="additionalinput"> + </additionalInput> + </inputType> + <outputType + outputs="" + buildVariable="EXECUTABLES" + nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output"> + <enablement + type="ALL"> + <checkOption + optionId="test.gnu.cpp.link.option.shared" + value="false"/> + </enablement> + </outputType> + <outputType + outputs="so" + outputPrefix="lib" + nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider" + buildVariable="LIBRARIES" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so"> + <enablement + type="ALL"> + <checkOption + optionId="test.gnu.cpp.link.option.shared" + value="true"/> + </enablement> + </outputType> + </tool> + <tool + natureFilter="both" + isAbstract="true" + isSystem="false" + name="Test 4.0 ToolName.archiver.gnu" + command="ar" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver"> + <supportedProperties> + <property id="org.eclipse.cdt.build.core.buildArtefactType"> + <value id="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </property> + </supportedProperties> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver" + name="Test 4.0 OptionCategory.General" + id="test.gnu.lib.category.general"> + </optionCategory> + <option + defaultValue="-r" + name="Test 4.0 Option.Posix.Archiver.Flags" + category="test.gnu.lib.category.general" + valueType="string" + id="test.gnu.both.lib.option.flags"> + </option> + <inputType + sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile" + sources="o" + multipleOfType="true" + dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator" + buildVariable="OBJS" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.input"> + <additionalInput + paths="$(USER_OBJS)" + kind="additionalinputdependency"> + </additionalInput> + <additionalInput + paths="$(LIBS)" + kind="additionalinput"> + </additionalInput> + </inputType> + <outputType + outputs="a" + outputPrefix="lib" + buildVariable="ARCHIVES" + nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.output"> + </outputType> + </tool> + + <tool + command="as" + isSystem="false" + name="Test 4.0 ToolName.assembler.gnu" + outputFlag="-o" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler" + natureFilter="both" + errorParsers="org.eclipse.cdt.core.GASErrorParser"> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler" + name="Test 4.0 OptionCategory.General" + id="test.gnu.asm.category.general"> + </optionCategory> + <option + name="Test 4.0 Option.Gnu.Assembler.Flags" + category="test.gnu.asm.category.general" + valueType="string" + id="test.gnu.both.asm.option.flags"> + </option> + <option + command="-I" + valueType="includePath" + category="test.gnu.asm.category.general" + browseType="directory" + name="Test 4.0 Option.Posix.InclPaths" + id="test.gnu.both.asm.option.include.paths"/> + <option + command="-W" + defaultValue="false" + valueType="boolean" + category="test.gnu.asm.category.general" + name="Test 4.0 Option.Gnu.Assembler.warn.suppress" + id="test.gnu.both.asm.option.warnings.nowarn"/> + <option + command="-v" + defaultValue="false" + valueType="boolean" + category="test.gnu.asm.category.general" + name="Test 4.0 Option.Gnu.Assembler.version" + id="test.gnu.both.asm.option.version"/> + <inputType + sourceContentType="org.eclipse.cdt.core.asmSource" + sources="s,S" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.input"> + </inputType> + <outputType + outputs="o" + buildVariable="OBJS" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.output"> + </outputType> + </tool> + + <tool + name="Test 4.0 ToolName.compiler.gnu.c" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + isSystem="false" + isAbstract="true" + command="gcc" + natureFilter="both" + outputFlag="-o" + errorParsers="org.eclipse.cdt.core.GCCErrorParser"> + <supportedProperties> + <property id="org.eclipse.cdt.build.core.buildType"> + <value id="org.eclipse.cdt.build.core.buildType.debug"/> + <value id="org.eclipse.cdt.build.core.buildType.release"/> + </property> + </supportedProperties> + <envVarBuildPath + pathType="buildpathInclude" + variableList="CPATH,C_INCLUDE_PATH"> + </envVarBuildPath> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + name="Test 4.0 OptionCategory.Preproc" + id="test.gnu.c.compiler.category.preprocessor"> + </optionCategory> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Nostdinc" + category="test.gnu.c.compiler.category.preprocessor" + command="-nostdinc" + id="test.gnu.c.compiler.option.preprocessor.nostdinc" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.PreprocOnly" + category="test.gnu.c.compiler.category.preprocessor" + command="-E" + id="test.gnu.c.compiler.option.preprocessor.preprocess" + valueType="boolean"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + name="Test 4.0 OptionCategory.Symbols" + id="test.gnu.c.compiler.category.symbols"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.DefSym" + category="test.gnu.c.compiler.category.symbols" + command="-D" + id="test.gnu.c.compiler.option.preprocessor.def.symbols" + valueType="definedSymbols"> + </option> + <option + name="Test 4.0 Option.Posix.UndefSym" + category="test.gnu.c.compiler.category.symbols" + command="-U" + id="test.gnu.c.compiler.option.preprocessor.undef.symbol" + valueType="undefDefinedSymbols"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + name="Test 4.0 OptionCategory.Dirs" + id="test.gnu.c.compiler.category.dirs"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.InclPaths" + category="test.gnu.c.compiler.category.dirs" + command="-I" + id="test.gnu.c.compiler.option.include.paths" + valueType="includePath" + browseType="directory"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + name="Test 4.0 OptionCategory.Optimize" + id="test.gnu.c.compiler.category.optimization"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.OptLevel" + category="test.gnu.c.compiler.category.optimization" + id="test.gnu.c.compiler.option.optimization.level" + valueType="enumerated"> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.None" + isDefault="false" + command="-O0" + id="test.gnu.c.optimization.level.none"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.Optimize" + command="-O1" + id="test.gnu.c.optimization.level.optimize"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.More" + isDefault="true" + command="-O2" + id="test.gnu.c.optimization.level.more"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.Most" + command="-O3" + id="test.gnu.c.optimization.level.most"> + </enumeratedOptionValue> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="defaultValue" + value="test.gnu.c.optimization.level.most" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.release"/> + </enablement> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="defaultValue" + value="test.gnu.c.optimization.level.none" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.debug"/> + </enablement> + + </option> + <option + name="Test 4.0 Option.Posix.Optimize.Flags" + category="test.gnu.c.compiler.category.optimization" + id="test.gnu.c.compiler.option.optimization.flags" + valueType="string"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + name="Test 4.0 OptionCategory.Debug" + id="test.gnu.c.compiler.category.debug"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.DebugLevel" + category="test.gnu.c.compiler.category.debug" + id="test.gnu.c.compiler.option.debugging.level" + valueType="enumerated"> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.None" + isDefault="false" + id="test.gnu.c.debugging.level.none"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.Min" + command="-g1" + id="test.gnu.c.debugging.level.minimal"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.Def" + isDefault="true" + command="-g" + id="test.gnu.c.debugging.level.default"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.Max" + isDefault="false" + command="-g3" + id="test.gnu.c.debugging.level.max"> + </enumeratedOptionValue> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="value" + value="test.gnu.c.debugging.level.none" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.release"/> + </enablement> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="value" + value="test.gnu.c.debugging.level.max" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.debug"/> + </enablement> + + </option> + <option + name="Test 4.0 Option.Posix.Debug.Other" + category="test.gnu.c.compiler.category.debug" + id="test.gnu.c.compiler.option.debugging.other" + valueType="string"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Debug.gprof" + category="test.gnu.c.compiler.category.debug" + command="-pg" + id="test.gnu.c.compiler.option.debugging.gprof" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Debug.prof" + category="test.gnu.c.compiler.category.debug" + command="-p" + id="test.gnu.c.compiler.option.debugging.prof" + valueType="boolean"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + name="Test 4.0 OptionCategory.Warn" + id="test.gnu.c.compiler.category.warnings"> + </optionCategory> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.Syntax" + category="test.gnu.c.compiler.category.warnings" + command="-fsyntax-only" + id="test.gnu.c.compiler.option.warnings.syntax" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.Pedandic" + category="test.gnu.c.compiler.category.warnings" + command="-pedantic" + id="test.gnu.c.compiler.option.warnings.pedantic" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.PedErrors" + category="test.gnu.c.compiler.category.warnings" + command="-pedantic-errors" + id="test.gnu.c.compiler.option.warnings.pedantic.error" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.nowarn" + category="test.gnu.c.compiler.category.warnings" + command="-w" + id="test.gnu.c.compiler.option.warnings.nowarn" + valueType="boolean"> + </option> + <option + defaultValue="true" + name="Test 4.0 Option.Posix.Warn.allwarn" + category="test.gnu.c.compiler.category.warnings" + command="-Wall" + id="test.gnu.c.compiler.option.warnings.allwarn" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.toerrs" + category="test.gnu.c.compiler.category.warnings" + command="-Werror" + id="test.gnu.c.compiler.option.warnings.toerrors" + valueType="boolean"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + name="Test 4.0 OptionCategory.Misc" + id="test.gnu.c.compiler.category.other"> + </optionCategory> + <option + defaultValue="-c -fmessage-length=0" + name="Test 4.0 Option.OtherFlags" + category="test.gnu.c.compiler.category.other" + id="test.gnu.c.compiler.option.misc.other" + valueType="string"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Verbose" + category="test.gnu.c.compiler.category.other" + command="-v" + id="test.gnu.c.compiler.option.misc.verbose" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Ansi" + category="test.gnu.c.compiler.category.other" + command="-ansi" + id="test.gnu.c.compiler.option.misc.ansi" + valueType="boolean"> + </option> + <inputType + sourceContentType="org.eclipse.cdt.core.cSource" + sources="c" + dependencyContentType="org.eclipse.cdt.core.cHeader" + dependencyExtensions="h" + dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.input" + languageId="org.eclipse.cdt.core.gcc"> + </inputType> + <outputType + outputs="o" + buildVariable="OBJS" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.output"> + </outputType> + </tool> + <tool + name="Test 4.0 ToolName.compiler.gnu.cpp" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + isAbstract="true" + isSystem="false" + command="g++" + natureFilter="ccnature" + outputFlag="-o" + errorParsers="org.eclipse.cdt.core.GCCErrorParser"> + <supportedProperties> + <property id="org.eclipse.cdt.build.core.buildType"> + <value id="org.eclipse.cdt.build.core.buildType.debug"/> + <value id="org.eclipse.cdt.build.core.buildType.release"/> + </property> + </supportedProperties> + <envVarBuildPath + pathType="buildpathInclude" + variableList="CPATH,CPLUS_INCLUDE_PATH"> + </envVarBuildPath> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + name="Test 4.0 OptionCategory.Preproc" + id="test.gnu.cpp.compiler.category.preprocessor"> + </optionCategory> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Nostdinc" + category="test.gnu.cpp.compiler.category.preprocessor" + command="-nostdinc" + id="test.gnu.cpp.compiler.option.preprocessor.nostdinc" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.PreprocOnly" + category="test.gnu.cpp.compiler.category.preprocessor" + command="-E" + id="test.gnu.cpp.compiler.option.preprocessor.preprocess" + valueType="boolean"> + </option> + <option + name="Test 4.0 Option.Posix.DefSym" + category="test.gnu.cpp.compiler.category.preprocessor" + command="-D" + id="test.gnu.cpp.compiler.option.preprocessor.def" + valueType="definedSymbols"> + </option> + <option + name="Test 4.0 Option.Posix.UndefSym" + category="test.gnu.cpp.compiler.category.preprocessor" + command="-U" + id="test.gnu.cpp.compiler.option.preprocessor.undef" + valueType="undefDefinedSymbols"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + name="Test 4.0 OptionCategory.Dirs" + id="test.gnu.cpp.compiler.category.dirs"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.InclPaths" + category="test.gnu.cpp.compiler.category.dirs" + command="-I" + id="test.gnu.cpp.compiler.option.include.paths" + valueType="includePath" + browseType="directory"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + name="Test 4.0 OptionCategory.Optimize" + id="test.gnu.cpp.compiler.category.optimization"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.OptLevel" + category="test.gnu.cpp.compiler.category.optimization" + id="test.gnu.cpp.compiler.option.optimization.level" + valueType="enumerated"> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.None" + command="-O0" + id="test.gnu.cpp.compiler.optimization.level.none"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.Optimize" + command="-O1" + id="test.gnu.cpp.compiler.optimization.level.optimize"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.More" + isDefault="true" + command="-O2" + id="test.gnu.cpp.compiler.optimization.level.more"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Optimize.Most" + command="-O3" + id="test.gnu.cpp.compiler.optimization.level.most"> + </enumeratedOptionValue> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="value" + value="test.gnu.cpp.compiler.optimization.level.most" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.release"/> + </enablement> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="value" + value="test.gnu.cpp.compiler.optimization.level.none" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.debug"/> + </enablement> + </option> + <option + name="Test 4.0 Option.Posix.Optimize.Flags" + category="test.gnu.cpp.compiler.category.optimization" + id="test.gnu.cpp.compiler.option.optimization.flags" + valueType="string"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + name="Test 4.0 OptionCategory.Debug" + id="test.gnu.cpp.compiler.category.debug"> + </optionCategory> + <option + name="Test 4.0 Option.Posix.DebugLevel" + category="test.gnu.cpp.compiler.category.debug" + id="test.gnu.cpp.compiler.option.debugging.level" + valueType="enumerated"> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.None" + isDefault="false" + id="test.gnu.cpp.compiler.debugging.level.none"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.Min" + command="-g1" + id="test.gnu.cpp.compiler.debugging.level.minimal"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.Def" + isDefault="true" + command="-g" + id="test.gnu.cpp.compiler.debugging.level.default"> + </enumeratedOptionValue> + <enumeratedOptionValue + name="Test 4.0 Option.Posix.Debug.Max" + isDefault="false" + command="-g3" + id="test.gnu.cpp.compiler.debugging.level.max"> + </enumeratedOptionValue> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="value" + value="test.gnu.cpp.compiler.debugging.level.none" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.release"/> + </enablement> + <enablement + type="CONTAINER_ATTRIBUTE" + attribute="value" + value="test.gnu.cpp.compiler.debugging.level.max" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildType" + value="org.eclipse.cdt.build.core.buildType.debug"/> + </enablement> + + </option> + <option + name="Test 4.0 Option.Posix.Debug.Other" + category="test.gnu.cpp.compiler.category.debug" + id="test.gnu.cpp.compiler.option.debugging.other" + valueType="string"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Debug.prof" + category="test.gnu.cpp.compiler.category.debug" + command="-p" + id="test.gnu.cpp.compiler.option.debugging.prof" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Debug.gprof" + category="test.gnu.cpp.compiler.category.debug" + command="-pg" + id="test.gnu.cpp.compiler.option.debugging.gprof" + valueType="boolean"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + name="Test 4.0 OptionCategory.Warn" + id="test.gnu.cpp.compiler.category.warnings"> + </optionCategory> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.Syntax" + category="test.gnu.cpp.compiler.category.warnings" + command="-fsyntax-only" + id="test.gnu.cpp.compiler.option.warnings.syntax" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.Pedandic" + category="test.gnu.cpp.compiler.category.warnings" + command="-pedantic" + id="test.gnu.cpp.compiler.option.warnings.pedantic" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.PedErrors" + category="test.gnu.cpp.compiler.category.warnings" + command="-pedantic-errors" + id="test.gnu.cpp.compiler.option.warnings.pedantic.error" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.nowarn" + category="test.gnu.cpp.compiler.category.warnings" + command="-w" + id="test.gnu.cpp.compiler.option.warnings.nowarn" + valueType="boolean"> + </option> + <option + defaultValue="true" + name="Test 4.0 Option.Posix.Warn.allwarn" + category="test.gnu.cpp.compiler.category.warnings" + command="-Wall" + id="test.gnu.cpp.compiler.option.warnings.allwarn" + valueType="boolean"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Warn.toerrs" + category="test.gnu.cpp.compiler.category.warnings" + command="-Werror" + id="test.gnu.cpp.compiler.option.warnings.toerrors" + valueType="boolean"> + </option> + <optionCategory + owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + name="Test 4.0 OptionCategory.Misc" + id="test.gnu.cpp.compiler.category.other"> + </optionCategory> + <option + defaultValue="-c -fmessage-length=0" + name="Test 4.0 Option.OtherFlags" + category="test.gnu.cpp.compiler.category.other" + id="test.gnu.cpp.compiler.option.other.other" + valueType="string"> + </option> + <option + defaultValue="false" + name="Test 4.0 Option.Posix.Verbose" + category="test.gnu.cpp.compiler.category.other" + command="-v" + id="test.gnu.cpp.compiler.option.other.verbose" + valueType="boolean"> + </option> + <inputType + sourceContentType="org.eclipse.cdt.core.cxxSource" + sources="c,C,cc,cxx,cpp" + dependencyContentType="org.eclipse.cdt.core.cxxHeader" + dependencyExtensions="h,H,hpp" + dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.input" + languageId="org.eclipse.cdt.core.g++"> + </inputType> + <outputType + outputs="o" + buildVariable="OBJS" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.output"> + </outputType> + </tool> + + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin" + name="Test 4.0 ToolName.linker.cygwin.gnu.c" + isSystem="false" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker"> + <envVarBuildPath + pathType="buildpathLibrary" + variableList="LIBRARY_PATH" + buildPathResolver="org.eclipse.cdt.managedbuilder.gnu.cygwin.CygwinPathResolver"> + </envVarBuildPath> + <outputType + outputs="exe" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output"> + </outputType> + <outputType + outputs="dll,a.dll" + outputPrefix="" + buildVariable="LIBRARIES" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output.so" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin" + name="Test 4.0 ToolName.linker.cygwin.gnu.cpp" + isSystem="false" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker"> + <envVarBuildPath + pathType="buildpathLibrary" + variableList="LIBRARY_PATH" + buildPathResolver="org.eclipse.cdt.managedbuilder.gnu.cygwin.CygwinPathResolver"> + </envVarBuildPath> + <outputType + outputs="exe" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output"> + </outputType> + <outputType + outputs="dll,a.dll" + outputPrefix="" + buildVariable="LIBRARIES" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output.so" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so"> + </outputType> + + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin" + name="Test 4.0 ToolName.compiler.cygwin.gnu.c" + isTest="false" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler" + optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.OneDirectionalPathConverter"> + <envVarBuildPath + pathType="buildpathInclude" + variableList="CPATH,C_INCLUDE_PATH" + buildPathResolver="org.eclipse.cdt.managedbuilder.gnu.cygwin.CygwinPathResolver"> + </envVarBuildPath> + <inputType + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.input.cygwin" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.input"/> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin" + name="Test 4.0 ToolName.compiler.cygwin.gnu.cpp" + isSystem="false" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler" + optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.BidirectionalPathConverter"> + <envVarBuildPath + pathType="buildpathInclude" + variableList="CPATH,CPLUS_INCLUDE_PATH" + buildPathResolver="org.eclipse.cdt.managedbuilder.gnu.cygwin.CygwinPathResolver"> + </envVarBuildPath> + <inputType + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.input"/> + </tool> + + <builder + isAbstract="true" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder" + command="make" + isSystem="false" + arguments="" + variableFormat="${=}" + isVariableCaseSensitive="true" + reservedMacroNames="ROOT,DEPS,OBJS,.*_SRCS,EXECUTABLES,SUBDIRS,LIBS,USER_OBJS,.*_INPUTS,.*_OUTPUTS" + buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator" + macroInputFileNameValue="$(notdir $<)" + macroInputFileExtValue="$(suffix $(notdir $<))" + macroInputFileBaseNameValue="$(basename $(notdir $<))" + macroInputFileRelPathValue="$<" + macroInputDirRelPathValue="$(dir $<)" + macroOutputFileNameValue="$(notdir $@)" + macroOutputFileExtValue="$(suffix $(notdir $@))" + macroOutputFileBaseNameValue="$(basename $(notdir $@))" + macroOutputFileRelPathValue="$@" + macroOutputDirRelPathValue="$(dir $@)" + autoBuildTarget="all" + incrementalBuildTarget="all" + cleanBuildTarget="clean" + ignoreErrCmd="-k" + parallelBuildCmd="-j*" + errorParsers="org.eclipse.cdt.core.MakeErrorParser" + name="Gnu Make Builder"> + </builder> + + <toolChain + archList="all" + isSystem="false" + osList="linux,hpux,aix,qnx" + name="Test 4.0 ToolChainName.Linux" + targetTool="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker;test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker;test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base" + name="Test 4.0 PlatformName.Dbg" + binaryParser="org.eclipse.cdt.core.ELF" + osList="linux,hpux,aix,qnx" + archList="all"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver"> + <enablement + type="ALL"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </enablement> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker"> + <enablement + type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker"> + <enablement + type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler"> + </tool> + </toolChain> + + <configuration + id="test.four.dot.zero.cdt.managedbuild.config.gnu.base" + cleanCommand="rm -rf" + > + <enablement type="CONTAINER_ATTRIBUTE" + attribute="artifactExtension" + value="so" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/> + </enablement> + <enablement type="CONTAINER_ATTRIBUTE" + attribute="artifactExtension" + value="a" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </enablement> + </configuration> + + <projectType + isAbstract="false" + isTest="false" + buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.exe"> + <configuration + name="Test 4.0 ConfigName.Dbg" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.exe.debug" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base" + cleanCommand="rm -rf"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.exe.debug"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.exe.debug"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option + id="test.gnu.cpp.compiler.exe.debug.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.exe.debug.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base"> + <option + id="test.gnu.c.compiler.exe.debug.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.exe.debug.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base"> + </tool> + </toolChain> + </configuration> + <configuration + name="Test 4.0 ConfigName.Rel" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.exe.release" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base" + cleanCommand="rm -rf"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.exe.release"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.exe.release"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option + id="test.gnu.cpp.compiler.exe.release.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.exe.release.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base"> + <option + id="test.gnu.c.compiler.exe.release.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.exe.release.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base"> + </tool> + </toolChain> + </configuration> + </projectType> + + <projectType + isAbstract="false" + isTest="false" + buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.so"> + <configuration + name="Test 4.0 ConfigName.Dbg" + cleanCommand="rm -rf" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.so.debug"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.so.debug"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.so.debug"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option + id="test.gnu.cpp.compiler.so.debug.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.so.debug.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base"> + <option + id="test.gnu.c.compiler.so.debug.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.so.debug.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base"> + <option + id="test.gnu.c.link.so.debug.option.shared" + superClass="test.gnu.c.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.debug.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base"> + <option + id="test.gnu.cpp.link.so.debug.option.shared" + superClass="test.gnu.cpp.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.debug.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base"> + </tool> + </toolChain> + </configuration> + <configuration + name="Test 4.0 ConfigName.Rel" + cleanCommand="rm -rf" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.so.release"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.so.release"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.so.release"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option + id="test.gnu.cpp.compiler.so.release.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.so.release.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base"> + <option + id="test.gnu.c.compiler.so.release.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.so.release.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base"> + <option + id="test.gnu.c.link.so.release.option.shared" + superClass="test.gnu.c.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.release.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base"> + <option + id="test.gnu.cpp.link.so.release.option.shared" + superClass="test.gnu.cpp.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.release.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base"> + </tool> + </toolChain> + </configuration> + </projectType> + + <projectType + isTest="false" + buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" + isAbstract="false" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.lib"> + <configuration + name="Test 4.0 ConfigName.Dbg" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base" + cleanCommand="rm -rf" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.lib.debug"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.lib.debug"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.lib.debug"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option + id="test.gnu.cpp.compiler.lib.debug.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.lib.debug.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base"> + <option + id="test.gnu.c.compiler.lib.debug.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.lib.debug.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base"> + </tool> + </toolChain> + </configuration> + <configuration + name="Test 4.0 ConfigName.Rel" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base" + cleanCommand="rm -rf" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.lib.release"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.lib.release"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.lib.release"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option + id="test.gnu.cpp.compiler.lib.release.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.lib.release.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base"> + <option + id="test.gnu.c.compiler.lib.release.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.lib.release.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base"> + </tool> + </toolChain> + </configuration> + </projectType> + + <toolChain + archList="all" + osList="win32" + name="Test 4.0 ToolChainName.Cygwin" + targetTool="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base;cdt.managedbuild.tool.gnu.c.linker.cygwin.base;cdt.managedbuild.tool.gnu.archiver" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base" + name="Test 4.0 PlatformName.Dbg" + binaryParser="org.eclipse.cdt.core.Cygwin_PE" + osList="win32" + archList="all"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base"> + </builder> + + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver"> + <enablement + type="ALL"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </enablement> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin"> + <enablement + type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin"> + <enablement + type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + + </toolChain> + + <configuration + id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base" + cleanCommand="rm -rf" + artifactExtension="exe" + > + <enablement type="CONTAINER_ATTRIBUTE" + attribute="artifactExtension" + value="dll" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/> + </enablement> + <enablement type="CONTAINER_ATTRIBUTE" + attribute="artifactExtension" + value="a" + extensionAdjustment="false"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </enablement> + </configuration> + + <projectType + buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.cygwin.exe" + isTest="false" + isAbstract="false"> + <configuration + name="Test 4.0 ConfigName.Dbg" + cleanCommand="rm -rf" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.exe.debug" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.exe.debug"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.exe.debug"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base"> + <option + id="test.gnu.cpp.compiler.cygwin.exe.debug.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.cygwin.exe.debug.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base"> + <option + id="test.gnu.c.compiler.cygwin.exe.debug.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.cygwin.exe.debug.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.exe.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base"> + </tool> + </toolChain> + </configuration> + <configuration + name="Test 4.0 ConfigName.Rel" + cleanCommand="rm -rf" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.exe.release" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.exe.release"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.exe.release"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base"> + <option + id="test.gnu.cpp.compiler.cygwin.exe.release.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.cygwin.exe.release.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base"> + <option + id="test.gnu.c.compiler.cygwin.exe.release.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.cygwin.exe.release.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.exe.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base"> + </tool> + </toolChain> + </configuration> + </projectType> + + <projectType + buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.cygwin.so" + isAbstract="false" + isTest="false"> + <configuration + name="Test 4.0 ConfigName.Dbg" + cleanCommand="rm -rf" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.so.debug"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.so.debug"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.so.debug"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base"> + <option + id="test.gnu.cpp.compiler.cygwin.so.debug.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.cygwin.so.debug.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base"> + <option + id="test.gnu.c.compiler.cygwin.so.debug.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.cygwin.so.debug.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base"> + <option + id="test.gnu.c.link.cygwin.so.debug.option.shared" + superClass="test.gnu.c.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.debug.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base"> + <option + id="test.gnu.cpp.link.cygwin.so.debug.option.shared" + superClass="test.gnu.cpp.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.debug.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.so.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base"> + </tool> + </toolChain> + </configuration> + <configuration + name="Test 4.0 ConfigName.Rel" + cleanCommand="rm -rf" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.so.release"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.so.release"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.so.release"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base"> + <option + id="test.gnu.cpp.compiler.cygwin.so.release.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.cygwin.so.release.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base"> + <option + id="test.gnu.c.compiler.cygwin.so.release.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.cygwin.so.release.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base"> + <option + id="test.gnu.c.link.cygwin.so.release.option.shared" + superClass="test.gnu.c.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.release.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base"> + <option + id="test.gnu.cpp.link.cygwin.so.release.option.shared" + superClass="test.gnu.cpp.link.option.shared"> + </option> + <outputType + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output.so" + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.release.output"> + </outputType> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.so.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base"> + </tool> + </toolChain> + </configuration> + </projectType> + + <projectType + buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.cygwin.lib" + isTest="false" + isAbstract="false"> + <configuration + name="Test 4.0 ConfigName.Dbg" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" + cleanCommand="rm -rf" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.lib.debug"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.lib.debug"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.lib.debug"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base"> + <option + id="test.gnu.cpp.compiler.cygwin.lib.debug.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.cygwin.lib.debug.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base"> + <option + id="test.gnu.c.compiler.cygwin.lib.debug.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.cygwin.lib.debug.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.lib.debug" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base"> + </tool> + </toolChain> + </configuration> + <configuration + name="Test 4.0 ConfigName.Rel" + parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base" + buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" + cleanCommand="rm -rf" + id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.lib.release"> + <toolChain + superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.lib.release"> + <targetPlatform + id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base"> + </targetPlatform> + <builder + superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base" + id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.lib.release"> + </builder> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base"> + <option + id="test.gnu.cpp.compiler.cygwin.lib.release.option.optimization.level" + superClass="test.gnu.cpp.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.cpp.compiler.cygwin.lib.release.option.debugging.level" + superClass="test.gnu.cpp.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base"> + <option + id="test.gnu.c.compiler.cygwin.lib.release.option.optimization.level" + superClass="test.gnu.c.compiler.option.optimization.level"> + </option> + <option + id="test.gnu.c.compiler.cygwin.lib.release.option.debugging.level" + superClass="test.gnu.c.compiler.option.debugging.level"> + </option> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.base"> + </tool> + <tool + id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.lib.release" + superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base"> + </tool> + </toolChain> + </configuration> + </projectType> + + </extension> + + </plugin> diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40/test_40.zip b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40/test_40.zip Binary files differnew file mode 100644 index 00000000000..d08625764b5 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40/test_40.zip diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40_pathconverter/test_40_pathconverter.zip b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40_pathconverter/test_40_pathconverter.zip Binary files differnew file mode 100644 index 00000000000..e9040f15174 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40_pathconverter/test_40_pathconverter.zip diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java index 4a94cda3045..88412320a5f 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java @@ -10,6 +10,10 @@ *******************************************************************************/ package org.eclipse.cdt.managedbuilder.testplugin; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; + import junit.framework.Assert; import org.eclipse.cdt.core.CCorePlugin; @@ -117,4 +121,40 @@ public class BuildSystemTestHelper { return project; } + + static public void checkDiff(Object[] arr1, Object[] arr2){ + LinkedHashSet set1 = new LinkedHashSet(Arrays.asList(arr1)); + LinkedHashSet set2 = new LinkedHashSet(Arrays.asList(arr2)); + LinkedHashSet set1Copy = new LinkedHashSet(set1); + set1.removeAll(set2); + set2.removeAll(set1Copy); + + String set1String = collectionToString(set1); + String set2String = collectionToString(set2); + String diffMsg = "array1 entries: " + set1String + ",\n array2 entries: " + set2String + "\n"; + Assert.assertEquals("arrays have different size\n" + diffMsg, arr1.length, arr2.length); + Assert.assertEquals("arrays have different contents\n" + diffMsg, 0, set1.size()); + Assert.assertEquals("arrays have different contents\n" + diffMsg, 0, set2.size()); + + if(!Arrays.equals(arr1, arr2)){ + Assert.fail("different element order, dumping..\n array1 entries: " + arrayToString(arr1) + "\n array2 entries: " + arrayToString(arr2) + "\n"); + } + } + + static public String collectionToString(Collection c){ + return arrayToString(c.toArray()); + } + + static public String arrayToString(Object[] arr){ + StringBuffer buf = new StringBuffer(); + buf.append('['); + for(int i = 0; i < arr.length; i++) { + if(i != 0) + buf.append(", "); + + buf.append(arr[i].toString()); + } + buf.append(']'); + return buf.toString(); + } } 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 f0e688423d0..a48c1074016 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 @@ -412,6 +412,74 @@ public class ManagedBuildTestHelper { return true; } + static public boolean compareBenchmarks(final IProject project, IPath testDir, String[] fileNames) { + return compareBenchmarks(project, testDir, new Path("benchmarks").append(testDir), fileNames); + } + + static public boolean compareBenchmarks(final IProject project, IPath testDir, IPath benchmarkDir, String[] fileNames) { + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + IWorkspaceRunnable runnable = new IWorkspaceRunnable() { + public void run(IProgressMonitor monitor) throws CoreException { + project.refreshLocal(IResource.DEPTH_INFINITE, monitor); + } + }; + try { + NullProgressMonitor monitor = new NullProgressMonitor(); + workspace.run(runnable, workspace.getRoot(), IWorkspace.AVOID_UPDATE, monitor); + } catch (Exception e) { + Assert.fail("File " + fileNames[0] + " - project refresh failed."); + } + + IFolder testFolder = (IFolder)project.findMember(testDir); + IFolder bmFolder = (IFolder)project.findMember(benchmarkDir); + + return compareBenchmarks(testFolder, bmFolder, fileNames); + } + + static public boolean compareBenchmarks(IFolder testFolder, IFolder bmFolder, String[] fileNames) { + Assert.assertNotNull(testFolder); + Assert.assertNotNull(bmFolder); + + for (int i=0; i<fileNames.length; i++) { + IFile tFile = testFolder.getFile(fileNames[i]); + IFile bmFile = bmFolder.getFile(fileNames[i]); + if(!tFile.exists() && !bmFile.exists()) + continue; + + compareBenchmarks(tFile, bmFile); + } + + return true; + } + + static public boolean compareBenchmarks(IFile tFile, IFile bmFile) { + StringBuffer testBuffer = readContentsStripLineEnds(tFile); + StringBuffer benchmarkBuffer = readContentsStripLineEnds(bmFile); + if (!testBuffer.toString().equals(benchmarkBuffer.toString())) { + StringBuffer buffer = new StringBuffer(); + buffer.append("File ").append(tFile.getName()).append(" does not match its benchmark.\n "); + buffer.append("expected:\n "); + buffer.append("\"").append(benchmarkBuffer).append("\""); + buffer.append("\n\n "); + buffer.append("but was:\n "); + buffer.append("\"").append(testBuffer).append("\""); + buffer.append("\n\n "); + + buffer.append(">>>>>>>>>>>>>>>start diff: \n"); + String location1 = getFileLocation(bmFile.getProject(), bmFile.getProjectRelativePath()); + String location2 = getFileLocation(tFile.getProject(), tFile.getProjectRelativePath()); + String diff = DiffUtil.getInstance().diff(location1, location2); + if(diff == null) + diff = "!diff failed!"; + buffer.append(diff); + buffer.append("\n<<<<<<<<<<<end diff"); + buffer.append("\n\n "); + + Assert.fail(buffer.toString()); + } + return true; + } + static public boolean verifyFilesDoNotExist(final IProject project, IPath testDir, IPath[] files) { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceRunnable runnable = new IWorkspaceRunnable() { @@ -443,6 +511,9 @@ public class ManagedBuildTestHelper { static public String getFileLocation(IProject project, IPath path){ return project.getLocation().append(path).toString(); } + static public StringBuffer readContentsStripLineEnds(IFile file) { + return readContentsStripLineEnds(file.getProject(), file.getProjectRelativePath()); + } static public StringBuffer readContentsStripLineEnds(IProject project, IPath path) { StringBuffer buff = new StringBuffer(); IPath fullPath = project.getLocation().append(path); diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BidirectionalPathConverter.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BidirectionalPathConverter.java new file mode 100644 index 00000000000..c40efdc9ca9 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BidirectionalPathConverter.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2007 Intel Corporation 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Intel Corporation - Initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.managedbuilder.core.tests; + +import org.eclipse.cdt.core.settings.model.ICSettingEntry; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IReverseOptionPathConverter; +import org.eclipse.cdt.managedbuilder.core.ITool; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; + +public class BidirectionalPathConverter extends OneDirectionalPathConverter implements IReverseOptionPathConverter { + + public String convertToOptionValue(ICSettingEntry entry, IOption option, + ITool tool) { + String name = entry.getName(); + IPath path = new Path(name); + + if(PREFIX.isPrefixOf(path)) + return path.removeFirstSegments(PREFIX.segmentCount()).makeAbsolute().toString(); + else if (!path.isAbsolute()) + path = new Path("../" + path.toString()); + return path.toString(); + } + +} diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java new file mode 100644 index 00000000000..f42c115f9db --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java @@ -0,0 +1,566 @@ +/******************************************************************************* + * Copyright (c) 2007 Intel Corporation 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Intel Corporation - Initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.managedbuilder.core.tests; + +import java.io.File; +import java.io.FileFilter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.settings.model.CIncludePathEntry; +import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.core.settings.model.ICFolderDescription; +import org.eclipse.cdt.core.settings.model.ICLanguageSetting; +import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry; +import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager; +import org.eclipse.cdt.core.settings.model.ICSettingEntry; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IFolderInfo; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.core.OptionStringValue; +import org.eclipse.cdt.managedbuilder.internal.core.Tool; +import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper; +import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin; +import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IncrementalProjectBuilder; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Path; +import org.eclipse.ui.dialogs.IOverwriteQuery; + +public class BuildSystem40Tests extends TestCase { + private IProject p1; + + public static Test suite() { + TestSuite suite = new TestSuite(BuildSystem40Tests.class); + + return suite; + } + + public void test40() throws Exception{ + String[] makefiles = { + "makefile", + "objects.mk", + "sources.mk", + "subdir.mk"}; +// doTest("test_40", "dbg 2"); + IProject[] projects = createProjects("test_40", null, null, true); + ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); + ICProjectDescription des = mngr.getProjectDescription(projects[0]); + ICConfigurationDescription cfgDes = des.getConfigurationByName("dbg 2"); + assertNotNull(cfgDes); + des.setActiveConfiguration(cfgDes); + mngr.setProjectDescription(projects[0], des); + buildProjects(projects, makefiles); + + des = mngr.getProjectDescription(projects[0]); + cfgDes = des.getConfigurationByName("Test 4.0 ConfigName.Dbg"); + assertNotNull(cfgDes); + des.setActiveConfiguration(cfgDes); + mngr.setProjectDescription(projects[0], des); + buildProjects(projects, makefiles); + + des = mngr.getProjectDescription(projects[0]); + cfgDes = des.getConfigurationByName("dbg 3"); + IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes); + + ICFolderDescription foDes = cfgDes.getRootFolderDescription(); + ICLanguageSetting ls = foDes.getLanguageSettingForFile("foo.cpp"); + IFolderInfo foInfo = cfg.getRootFolderInfo(); + Tool tool = (Tool)foInfo.getToolFromInputExtension("cpp"); + IOption option = ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]; + OptionStringValue[] value = option.getBasicStringListValueElements(); + ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[] { + new CIncludePathEntry("dbg 3/rel/path", 0), + new CIncludePathEntry("proj/rel/path", 0), + new CIncludePathEntry("/abs/path", 0), + new CIncludePathEntry("c:/abs/path", 0), + new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("D:\\docs\\incs", 0), + }; + + assertTrue(Arrays.equals(entries, expectedEntries)); + + ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, entries); + + entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + assertTrue(Arrays.equals(entries, expectedEntries)); + + option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]; + OptionStringValue[] modifiedValue = option.getBasicStringListValueElements(); + assertTrue(Arrays.equals(modifiedValue, value)); + + + List list = new ArrayList(); + list.addAll(Arrays.asList(entries)); + list.add(new CIncludePathEntry("E:\\tmp\\w", 0)); + entries = (ICLanguageSettingEntry[])list.toArray(new ICLanguageSettingEntry[0]); + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries); + expectedEntries = entries; + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + assertTrue(Arrays.equals(entries, expectedEntries)); + + list = new ArrayList(); + list.addAll(Arrays.asList(value)); + list.add(new OptionStringValue("\"E:\\tmp\\w\"")); + value = (OptionStringValue[])list.toArray(new OptionStringValue[0]); + + option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]; + modifiedValue = option.getBasicStringListValueElements(); + + assertTrue(Arrays.equals(value, modifiedValue)); + + foDes = (ICFolderDescription)cfgDes.getResourceDescription(new Path("d1/d2"), true); + foInfo = (IFolderInfo)cfg.getResourceInfo(new Path("d1/d2"), true); + + ls = foDes.getLanguageSettingForFile("foo.cpp"); + tool = (Tool)foInfo.getToolFromInputExtension("cpp"); + option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]; + + expectedEntries = new ICLanguageSettingEntry[] { + new CIncludePathEntry("dbg 3/d2_rel/path", 0), + new CIncludePathEntry("d2_proj/rel/path", 0), + new CIncludePathEntry("/d2_abs/path", 0), + new CIncludePathEntry("c:/d2_abs/path", 0), + new CIncludePathEntry("dbg 3/d1_rel/path", 0), + new CIncludePathEntry("d1_proj/rel/path", 0), + new CIncludePathEntry("/d1_abs/path", 0), + new CIncludePathEntry("c:/d1_abs/path", 0), + new CIncludePathEntry("dbg 3/rel/path", 0), + new CIncludePathEntry("proj/rel/path", 0), + new CIncludePathEntry("/abs/path", 0), + new CIncludePathEntry("c:/abs/path", 0), + new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("D:\\docs\\incs", 0), + new CIncludePathEntry("E:\\tmp\\w", 0), + new CIncludePathEntry("D:\\d1_docs\\incs", 0), + new CIncludePathEntry("D:\\d2_docs\\incs", 0), + }; + + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + OptionStringValue[] expectedValue = new OptionStringValue[] { + new OptionStringValue("d2_rel/path"), + new OptionStringValue("../d2_proj/rel/path"), + new OptionStringValue("/d2_abs/path"), + new OptionStringValue("c:/d2_abs/path"), + new OptionStringValue("${IncludeDefaults}"), + new OptionStringValue("\"D:\\d2_docs\\incs\""), + }; + + value = option.getBasicStringListValueElements(); + BuildSystemTestHelper.checkDiff(expectedValue, value); + + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries); + value = option.getBasicStringListValueElements(); + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + list = new ArrayList(Arrays.asList(entries)); + list.remove(6); //new CIncludePathEntry("/d1_abs/path", 0), + expectedEntries = (ICLanguageSettingEntry[])list.toArray(new ICLanguageSettingEntry[0]); + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list); + + option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]; + + expectedValue = new OptionStringValue[] { + new OptionStringValue("d2_rel/path"), + new OptionStringValue("../d2_proj/rel/path"), + new OptionStringValue("/d2_abs/path"), + new OptionStringValue("c:/d2_abs/path"), + new OptionStringValue("d1_rel/path"), + new OptionStringValue("../d1_proj/rel/path"), +//removed new OptionStringValue("/d1_abs/path"), + new OptionStringValue("c:/d1_abs/path"), + new OptionStringValue("rel/path"), + new OptionStringValue("../proj/rel/path"), + new OptionStringValue("/abs/path"), + new OptionStringValue("c:/abs/path"), + new OptionStringValue("\"${workspace_loc:/test_40/dir1/dir2/dir3}\""), + new OptionStringValue("\"${workspace_loc:/test_40}\""), + new OptionStringValue("\"D:\\docs\\incs\""), + new OptionStringValue("\"E:\\tmp\\w\""), + new OptionStringValue("\"D:\\d1_docs\\incs\""), + new OptionStringValue("\"D:\\d2_docs\\incs\""), + }; + + value = option.getBasicStringListValueElements(); + BuildSystemTestHelper.checkDiff(expectedValue, value); + + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + foDes = cfgDes.getRootFolderDescription(); + foInfo = cfg.getRootFolderInfo(); + ls = foDes.getLanguageSettingForFile("foo.cpp"); + tool = (Tool)foInfo.getToolFromInputExtension("cpp"); + option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]; + + list = new ArrayList(Arrays.asList(option.getBasicStringListValueElements())); + assertTrue(list.remove(new OptionStringValue("${IncludeDefaults}"))); + list.add(0, new OptionStringValue("${IncludeDefaults}")); + expectedValue = (OptionStringValue[])list.toArray(new OptionStringValue[0]); + option = foInfo.setOption(tool, option, (OptionStringValue[])list.toArray(new OptionStringValue[0])); + value = option.getBasicStringListValueElements(); + + expectedEntries = new ICLanguageSettingEntry[] { + new CIncludePathEntry("dbg 3/rel/path", 0), + new CIncludePathEntry("proj/rel/path", 0), + new CIncludePathEntry("/abs/path", 0), + new CIncludePathEntry("c:/abs/path", 0), + new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("D:\\docs\\incs", 0), + new CIncludePathEntry("E:\\tmp\\w", 0), + }; + + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries); + + assertTrue(option == tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]); + value = option.getBasicStringListValueElements(); + + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + + list = new ArrayList(Arrays.asList(option.getBasicStringListValueElements())); + assertTrue(list.remove(new OptionStringValue("${IncludeDefaults}"))); + list.add(list.size(), new OptionStringValue("${IncludeDefaults}")); + expectedValue = (OptionStringValue[])list.toArray(new OptionStringValue[0]); + option = foInfo.setOption(tool, option, (OptionStringValue[])list.toArray(new OptionStringValue[0])); + value = option.getBasicStringListValueElements(); + + expectedEntries = new ICLanguageSettingEntry[] { + new CIncludePathEntry("dbg 3/rel/path", 0), + new CIncludePathEntry("proj/rel/path", 0), + new CIncludePathEntry("/abs/path", 0), + new CIncludePathEntry("c:/abs/path", 0), + new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/), + new CIncludePathEntry("D:\\docs\\incs", 0), + new CIncludePathEntry("E:\\tmp\\w", 0), + }; + + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries); + + assertTrue(option == tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]); + value = option.getBasicStringListValueElements(); + + entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + + //deletion is performed in case if no fail occured + for(int i = 0; i < projects.length; i++){ + projects[i].delete(true, null); + assertNull(mngr.getProjectDescription(projects[i])); + assertNull(mngr.getProjectDescription(projects[i], false)); + + assertNull(ManagedBuildManager.getBuildInfo(projects[i])); + } + } + + public void test40_pathconverter() throws Exception { + IProject[] projects = createProjects("test_40_pathconverter", null, null, true); + ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); + + ICProjectDescription des = mngr.getProjectDescription(projects[0]); + ICConfigurationDescription cfgDes = des.getConfigurationByName("Test 4.0 ConfigName.Dbg"); + IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes); + + ICFolderDescription foDes = cfgDes.getRootFolderDescription(); + ICLanguageSetting ls = foDes.getLanguageSettingForFile("foo.cpp"); + IFolderInfo foInfo = cfg.getRootFolderInfo(); + Tool tool = (Tool)foInfo.getToolFromInputExtension("cpp"); + IOption option = ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]; + OptionStringValue[] value = option.getBasicStringListValueElements(); + ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + + OptionStringValue[] expectedValue = new OptionStringValue[] { + new OptionStringValue("../rel"), + new OptionStringValue("/abs"), + }; + + ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[] { + new CIncludePathEntry("rel", 0), + new CIncludePathEntry("/test/abs", 0), + }; + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries); + assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]); + value = option.getBasicStringListValueElements(); + entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + ArrayList list = new ArrayList(); + list.addAll(Arrays.asList(entries)); + list.add(new CIncludePathEntry("/test/another/abs", 0)); + expectedEntries = (ICLanguageSettingEntry[])list.toArray(new ICLanguageSettingEntry[0]); + + expectedValue = new OptionStringValue[] { + new OptionStringValue("../rel"), + new OptionStringValue("/abs"), + new OptionStringValue("/another/abs"), + }; + + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list); + + assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]); + + value = option.getBasicStringListValueElements(); + entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + + //testing one-way converter + ls = foDes.getLanguageSettingForFile("foo.c"); + tool = (Tool)foInfo.getToolFromInputExtension("c"); + option = ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]; + value = option.getBasicStringListValueElements(); + entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + + expectedValue = new OptionStringValue[] { + new OptionStringValue("../rel"), + new OptionStringValue("/abs"), + }; + + expectedEntries = new ICLanguageSettingEntry[] { + new CIncludePathEntry("rel", 0), + new CIncludePathEntry("/test/abs", 0), + }; + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries); + assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]); + value = option.getBasicStringListValueElements(); + entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + list = new ArrayList(); + list.addAll(Arrays.asList(entries)); + list.add(new CIncludePathEntry("/another/abs", 0)); + + expectedEntries = new ICLanguageSettingEntry[] { + new CIncludePathEntry("rel", 0), + new CIncludePathEntry("/test/abs", 0), + new CIncludePathEntry("/test/another/abs", 0), + }; + + expectedValue = new OptionStringValue[] { + new OptionStringValue("../rel"), + new OptionStringValue("/abs"), + new OptionStringValue("/another/abs"), + }; + + ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list); + + assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]); + + value = option.getBasicStringListValueElements(); + entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH); + + BuildSystemTestHelper.checkDiff(expectedValue, value); + BuildSystemTestHelper.checkDiff(expectedEntries, entries); + + //deletion is performed in case if no fail occured + for(int i = 0; i < projects.length; i++){ + projects[i].delete(true, null); + assertNull(mngr.getProjectDescription(projects[i])); + assertNull(mngr.getProjectDescription(projects[i], false)); + + assertNull(ManagedBuildManager.getBuildInfo(projects[i])); + } + } + + +// public void test40_2() throws Exception{ +// doTest("test_40", "Test 4.0 ConfigName.Dbg"); +// } + + private void doTest(String projName, String cfgName) throws Exception{ + String[] makefiles = { + "makefile", + "objects.mk", + "sources.mk", + "subdir.mk"}; + IProject[] projects = createProjects(projName, null, null, true); + ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); + ICProjectDescription d = mngr.getProjectDescription(projects[0]); + ICConfigurationDescription cfg = d.getConfigurationByName(cfgName); + assertNotNull(cfg); + d.setActiveConfiguration(cfg); + mngr.setProjectDescription(projects[0], d); + buildProjects(projects, makefiles); + } + + private void buildProjects(IProject projects[], String[] files) { + buildProjectsWorker(projects, files, true); + } + + private void buildProjectsWorker(IProject projects[], String[] files, boolean compareBenchmark) { + if(projects == null || projects.length == 0) + return; + + boolean succeeded = true; + for (int i = 0; i < projects.length; i++){ + IProject curProject = projects[i]; + + IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(curProject); + + //check whether the managed build info is converted + boolean isCompatible = true;//UpdateManagedProjectManager.isCompatibleProject(info); + //assertTrue(isCompatible); + + if (isCompatible){ + // Build the project in order to generate the makefiles + try{ + curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null); + } + catch(CoreException e){ + fail(e.getStatus().getMessage()); + } + catch(OperationCanceledException e){ + fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage()); + } + + //compare the generated makefiles to their benchmarks + if (files != null && files.length > 0) { + if (i == 0) { + String configName = info.getDefaultConfiguration().getName(); + IPath buildDir = Path.fromOSString(configName); + if (compareBenchmark){ + succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files); + } +// else +// succeeded = ManagedBuildTestHelper.verifyFilesDoNotExist(curProject, buildDir, files); + } + } + } + } + +// if (succeeded) { // Otherwise leave the projects around for comparison +// for (int i = 0; i < projects.length; i++) +// ManagedBuildTestHelper.removeProject(projects[i].getName()); +// } + } + + private IProject[] createProjects(String projName, IPath location, String projectTypeId, boolean containsZip) { + + // In case the projects need to be updated... + IOverwriteQuery queryALL = new IOverwriteQuery(){ + public String queryOverwrite(String file) { + return ALL; + }}; + IOverwriteQuery queryNOALL = new IOverwriteQuery(){ + public String queryOverwrite(String file) { + return NO_ALL; + }}; + +// UpdateManagedProjectManager.setBackupFileOverwriteQuery(queryALL); +// UpdateManagedProjectManager.setUpdateProjectQuery(queryALL); + + IProject projects[] = createProject(projName, location, projectTypeId, containsZip); + return projects; + } + + private IProject[] createProject(String projName, IPath location, String projectTypeId, boolean containsZip){ + ArrayList projectList = null; + if (containsZip) { + File testDir = CTestPlugin.getFileInPlugin(new Path("resources/test40Projects/" + projName)); + if(testDir == null) { + fail("Test project directory " + projName + " is missing."); + return null; + } + + File projectZips[] = testDir.listFiles(new FileFilter(){ + public boolean accept(File pathname){ + if(pathname.isDirectory()) + return false; + return true; + } + }); + + projectList = new ArrayList(projectZips.length); + for(int i = 0; i < projectZips.length; i++){ + try{ + String projectName = projectZips[i].getName(); + if(!projectName.endsWith(".zip")) + continue; + + projectName = projectName.substring(0,projectName.length()-".zip".length()); + if(projectName.length() == 0) + continue; + IProject project = ManagedBuildTestHelper.createProject(projectName, projectZips[i], location, projectTypeId); + if(project != null) + projectList.add(project); + } + catch(Exception e){ + } + } + if(projectList.size() == 0) { + fail("No projects found in test project directory " + testDir.getName() + ". The .zip file may be missing or corrupt."); + return null; + } + } else { + try{ + IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId); + if(project != null) + projectList = new ArrayList(1); + projectList.add(project); + } catch(Exception e){} + } + + return (IProject[])projectList.toArray(new IProject[projectList.size()]); + } + +} diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests20.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests20.java index e51da28f43d..dc71e3656c5 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests20.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests20.java @@ -45,7 +45,6 @@ import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin; import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature; -import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo; import org.eclipse.cdt.managedbuilder.internal.core.Option; import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper; import org.eclipse.core.resources.IFile; @@ -235,15 +234,15 @@ public class ManagedBuildCoreTests20 extends TestCase { final String[] expectedPaths = new String[5]; // This first path is a built-in, so it will not be manipulated by build manager - expectedPaths[0] = (new Path("/usr/include")).toString(); - expectedPaths[1] = (new Path("/opt/gnome/include")).toString(); - IPath path = new Path("C:\\home\\tester/include"); + expectedPaths[0] = (new Path("\\usr\\include")).toOSString(); + expectedPaths[1] = (new Path("\\opt\\gnome\\include")).toOSString(); + IPath path = new Path("C:\\home\\tester\\include"); if(path.isAbsolute()) // for win32 path is treated as absolute - expectedPaths[2] = path.toString(); + expectedPaths[2] = path.toOSString(); else // for Linux path is relative - expectedPaths[2] = project.getLocation().append("Sub Config").append(path).toString(); - expectedPaths[3] = project.getLocation().append( "includes" ).toString(); - expectedPaths[4] = (new Path("/usr/gnu/include")).toString(); + expectedPaths[2] = project.getLocation().append("Sub Config").append(path).toOSString(); + expectedPaths[3] = project.getLocation().append( "includes" ).toOSString(); + expectedPaths[4] = (new Path("\\usr\\gnu\\include")).toOSString(); // Create a new managed project based on the sub project type IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.sub"); @@ -323,9 +322,6 @@ public class ManagedBuildCoreTests20 extends TestCase { assertTrue(currentSymbols.containsKey("BUILTIN")); assertEquals((String)currentSymbols.get("BUILTIN"), ""); - //FIXME: - if(true) - return; String[] currentPaths = currentSettings.getIncludePaths(); assertTrue(Arrays.equals(expectedPaths, currentPaths)); diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OneDirectionalPathConverter.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OneDirectionalPathConverter.java new file mode 100644 index 00000000000..49e89304ca2 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OneDirectionalPathConverter.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2007 Intel Corporation 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Intel Corporation - Initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.managedbuilder.core.tests; + +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionPathConverter; +import org.eclipse.cdt.managedbuilder.core.ITool; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; + +public class OneDirectionalPathConverter implements IOptionPathConverter { + public static Path PREFIX = new Path("/test"); + + public IPath convertToPlatformLocation(String toolSpecificPath, + IOption option, ITool tool) { + IPath path = new Path(toolSpecificPath); + if(path.isAbsolute()) + return PREFIX.append(toolSpecificPath); + return path; + } + +} |