1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-15 12:15:47 +02:00

Add 2 new tests to the suite

Update makefile .zip files for change to makefile generation
This commit is contained in:
Leo Treggiari 2005-05-23 20:31:18 +00:00
parent d2122bb6df
commit 9788d24ca4
10 changed files with 141 additions and 1 deletions

View file

@ -3274,6 +3274,104 @@
</configuration>
</projectType>
<!-- Test tools and project types for testing multiple input types,
multiple output types, and input & output options
tar -cf & tar -tf -->
<projectType
isAbstract="false"
isTest="false"
name="test30_2"
id="test30_2.tar">
<configuration
name="X"
id="test30_2.tar.config"
artifactExtension="log"
cleanCommand="rm -rf"
errorParsers="">
<toolChain
name="ToolChain for test30_2"
targetTool="test30_2.tar.list"
id="test30_2.tar.toolchain">
<builder
id="test30_2.tar.builder"
name="Builder for test30_2"
buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
</builder>
<tool
name="tar-create"
command="tar"
commandLinePattern="${COMMAND} ${FLAGS} ${INPUTS}"
id="test30_2.tar-create">
<optionCategory
name="Options"
id="test30_2.tar-create.category">
</optionCategory>
<option
defaultValue="-cf"
name="All Flags"
category="test30_2.tar-create.category"
id="test30_2.tar-create.other"
valueType="string">
</option>
<option
defaultValue="new.tar"
name="Tar Filename"
category="test30_2.tar-create.category"
id="test30_2.tar-create.filename"
valueType="string">
</option>
<inputType
id="test30_2.tar-create.input1"
name="All cpp files"
multipleOfType="true"
sourceContentType="org.eclipse.cdt.core.cxxSource">
</inputType>
<inputType
id="test30_2.tar-create.input2"
name="All asm files"
multipleOfType="true"
sourceContentType="org.eclipse.cdt.core.asmSource">
</inputType>
<outputType
id="test30_2.tar-create.outputtar"
name="Tar file"
outputs="tar"
buildVariable="TAROUT"
option="test30_2.tar-create.filename">
</outputType>
</tool>
<tool
name="tar-list"
command="tar"
commandLinePattern="${COMMAND} ${FLAGS} ${INPUTS} &gt; ${OUTPUT}"
id="test30_2.tar-list">
<optionCategory
name="Options"
id="test30_2.tar-list.category">
</optionCategory>
<option
defaultValue="-tf"
name="All Flags"
category="test30_2.tar-list.category"
id="test30_2.tar-list.other"
valueType="string">
</option>
<inputType
id="test30_2.tar-list.input1"
buildVariable="TAROUT"
sources="tar">
</inputType>
<outputType
id="test30_2.tar-list.outputlog"
name="Log file"
outputs="log">
</outputType>
</tool>
</toolChain>
</configuration>
</projectType>
</extension>
</plugin>

View file

@ -56,7 +56,9 @@ public class ManagedProject30MakefileTests extends TestCase {
// rather than an MBS functionality issue
//suite.addTest(new ManagedProject30MakefileTests("test30LinkedFolder"));
suite.addTest(new ManagedProject30MakefileTests("test30CopyandDeploy"));
suite.addTest(new ManagedProject30MakefileTests("test30DeleteFile"));
suite.addTest(new ManagedProject30MakefileTests("test30_1"));
suite.addTest(new ManagedProject30MakefileTests("test30_2"));
return suite;
}
@ -145,7 +147,7 @@ public class ManagedProject30MakefileTests extends TestCase {
assertTrue(isCompatible);
if(isCompatible){
// Build the project in order to generate the maekfiles
// Build the project in order to generate the makefiles
try{
curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null);
}
@ -325,6 +327,32 @@ public class ManagedProject30MakefileTests extends TestCase {
IProject[] projects = createProjects("copyandDeploy", null, null, true);
buildProjects(projects, makefiles);
}
/* (non-Javadoc)
* tests 3.0 style tool integration in the context of deleting a file, to see if the proper behavior
* occurs in the managedbuild system
*/
public void test30DeleteFile(){
IPath[] makefiles = {
Path.fromOSString("makefile"),
Path.fromOSString("objects.mk"),
Path.fromOSString("subdir.mk"),
Path.fromOSString("sources.mk")};
IProject[] projects = createProjects("deleteFile", null, null, true);
IWorkspace workspace = ResourcesPlugin.getWorkspace();
ArrayList resourceList = new ArrayList(1);
IProject project = projects[0];
IFile projfile = project.getFile("filetobedeleted.cxx");
resourceList.add(projfile);
IResource[] fileResource = (IResource[])resourceList.toArray(new IResource[resourceList.size()]);
try {
workspace.delete(fileResource, false, null);
} catch (Exception e) {fail("could not delete file in project " + project.getName());}
try {
buildProjects(projects, makefiles);
} finally {};
}
/* (non-Javadoc)
* tests 3.0 style tool integration with pre and post process steps added to typical compile & link
@ -338,4 +366,18 @@ public class ManagedProject30MakefileTests extends TestCase {
IProject[] projects = createProjects("test30_1", null, null, true);
buildProjects(projects, makefiles);
}
/* (non-Javadoc)
* tests 3.0 style tool integration with multiple input types use Eclipse content types
*/
public void test30_2(){
IPath[] makefiles = {
Path.fromOSString("new.log"),
Path.fromOSString("makefile"),
Path.fromOSString("objects.mk"),
Path.fromOSString("sources.mk"),
Path.fromOSString("subdir.mk")};
IProject[] projects = createProjects("test30_2", null, null, true);
buildProjects(projects, makefiles);
}
}