1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Update test benchmarks corresponding to changes to better support output files in non-default locations

This commit is contained in:
Leo Treggiari 2005-05-30 18:40:08 +00:00
parent c93b5d938b
commit d4eb543b1c
16 changed files with 17 additions and 10 deletions

View file

@ -8,10 +8,8 @@ $(ROOT)/f1.c \
$(ROOT)/f2.c $(ROOT)/f2.c
OBJS += \ OBJS += \
${addprefix ./, \ ./f1.o \
f1.o \ ./f2.o
f2.o \
}
DEPS += \ DEPS += \
${addprefix ./, \ ${addprefix ./, \

View file

@ -130,9 +130,9 @@ public class ManagedProject21MakefileTests extends TestCase {
return projects; return projects;
} }
private void buildProjects(IProject projects[], IPath[] files) { private boolean buildProjects(IProject projects[], IPath[] files) {
if(projects == null || projects.length == 0) if(projects == null || projects.length == 0)
return; return false;
boolean succeeded = true; boolean succeeded = true;
for(int i = 0; i < projects.length; i++){ for(int i = 0; i < projects.length; i++){
@ -171,6 +171,7 @@ public class ManagedProject21MakefileTests extends TestCase {
for(int i = 0; i < projects.length; i++) for(int i = 0; i < projects.length; i++)
ManagedBuildTestHelper.removeProject(projects[i].getName()); ManagedBuildTestHelper.removeProject(projects[i].getName());
} }
return succeeded;
} }
private void createPathVariable(IPath tmpDir) { private void createPathVariable(IPath tmpDir) {
@ -254,6 +255,7 @@ public class ManagedProject21MakefileTests extends TestCase {
* tests 2.1 style tool integration for linked files * tests 2.1 style tool integration for linked files
*/ */
public void testLinkedLib(){ public void testLinkedLib(){
boolean succeeded = false;
IPath[] makefiles = { IPath[] makefiles = {
Path.fromOSString("makefile"), Path.fromOSString("makefile"),
Path.fromOSString("objects.mk"), Path.fromOSString("objects.mk"),
@ -275,14 +277,18 @@ public class ManagedProject21MakefileTests extends TestCase {
createFileLink(project, tmpDir, "f2link.c", "f2.c"); createFileLink(project, tmpDir, "f2link.c", "f2.c");
createFileLink(project, tmpDir, "test_ar.h", "test_ar.h"); createFileLink(project, tmpDir, "test_ar.h", "test_ar.h");
// Build the project // Build the project
buildProjects(projects, makefiles); succeeded = buildProjects(projects, makefiles);
} finally {ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);} } finally {
if (succeeded)
ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);
}
} }
/* (non-Javadoc) /* (non-Javadoc)
* tests 2.1 style tool integration for a linked folder * tests 2.1 style tool integration for a linked folder
*/ */
public void testLinkedFolder(){ public void testLinkedFolder(){
boolean succeeded = false;
IPath[] makefiles = { IPath[] makefiles = {
Path.fromOSString("makefile"), Path.fromOSString("makefile"),
Path.fromOSString("objects.mk"), Path.fromOSString("objects.mk"),
@ -308,7 +314,10 @@ public class ManagedProject21MakefileTests extends TestCase {
IPath location = Path.fromOSString(MBS_TEMP_DIR); IPath location = Path.fromOSString(MBS_TEMP_DIR);
IProject[] projects = createProjects("linkedFolder", location, "cdt.managedbuild.target.testgnu21.lib", false); IProject[] projects = createProjects("linkedFolder", location, "cdt.managedbuild.target.testgnu21.lib", false);
// Build the project // Build the project
buildProjects(projects, makefiles); succeeded = buildProjects(projects, makefiles);
} finally {ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);} } finally {
if (succeeded)
ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);
}
} }
} }