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

bug 212596: JUnit failures in cdt.managedbuilder.test.suite

Benchmarks/ moved out of archive
This commit is contained in:
Andrew Gvozdev 2009-10-11 01:30:45 +00:00
parent c97abde779
commit a183b1abbd
24 changed files with 523 additions and 18 deletions

View file

@ -0,0 +1,43 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: liblinkedLib.a
# Tool invocations
liblinkedLib.a: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: archiver.gnu'
ar -r "liblinkedLib.a" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(OBJS)$(C_DEPS) liblinkedLib.a
-@echo ' '
.PHONY: all clean dependents
.SECONDARY:
-include ../makefile.targets

View file

@ -0,0 +1,7 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
LIBS :=
USER_OBJS :=

View file

@ -0,0 +1,15 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
C_SRCS :=
S_UPPER_SRCS :=
O_SRCS :=
S_SRCS :=
OBJS :=
C_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
. \

View file

@ -0,0 +1,38 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
C:/Documents\ and\ Settings/ltreggia/CDTMBSTest/f1.c \
C:/Documents\ and\ Settings/ltreggia/CDTMBSTest/f2.c
OBJS += \
./f1.o \
./f2.o
C_DEPS += \
./f1.d \
./f2.d
# Each subdirectory must supply rules for building sources it contributes
f1.o: C:/Documents\ and\ Settings/agvozdev/CDTMBSTest/f1.c
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.c'
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0 "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '
f2.o: C:/Documents\ and\ Settings/agvozdev/CDTMBSTest/f2.c
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.c'
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0 "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '

View file

@ -0,0 +1,58 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include source2/source21/subdir.mk
-include source2/subdir.mk
-include source1/subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: testResCfg
# Tool invocations
testResCfg: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: linker.gnu.cpp'
g++ --strip-all -o"testResCfg" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(OBJS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS) testResCfg
-@echo ' '
.PHONY: all clean dependents
.SECONDARY:
-include ../makefile.targets

View file

@ -0,0 +1,7 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS :=

View file

@ -0,0 +1,26 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../source1/Class1.cpp
OBJS += \
./source1/Class1.o
CPP_DEPS += \
./source1/Class1.d
# Each subdirectory must supply rules for building sources it contributes
source1/%.o: ../source1/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.cpp'
g++ -I../headers -O0 -g3 -Wall -c -fmessage-length=0 -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
g++ -MM -MG -P -w -I../headers -O0 -g3 -Wall -c -fmessage-length=0 "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '

View file

@ -0,0 +1,26 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../source2/source21/Class21.cpp
OBJS += \
./source2/source21/Class21.o
CPP_DEPS += \
./source2/source21/Class21.d
# Each subdirectory must supply rules for building sources it contributes
source2/source21/Class21.o: ../source2/source21/Class21.cpp
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.cpp'
g++ -DRESSPEC -I../headers -O0 -g3 -Wall -c -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
g++ -MM -MG -P -w -DRESSPEC -I../headers -O0 -g3 -Wall -c "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '

View file

@ -0,0 +1,26 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../source2/Class2.cpp
OBJS += \
./source2/Class2.o
CPP_DEPS += \
./source2/Class2.d
# Each subdirectory must supply rules for building sources it contributes
source2/%.o: ../source2/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.cpp'
g++ -I../headers -O0 -g3 -Wall -c -fmessage-length=0 -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
g++ -MM -MG -P -w -I../headers -O0 -g3 -Wall -c -fmessage-length=0 "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '

View file

@ -0,0 +1,26 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
O_SRCS :=
CPP_SRCS :=
C_UPPER_SRCS :=
C_SRCS :=
S_UPPER_SRCS :=
S_SRCS :=
CXX_SRCS :=
CC_SRCS :=
OBJS :=
C_DEPS :=
CC_DEPS :=
CPP_DEPS :=
CXX_DEPS :=
C_UPPER_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
source2/source21 \
source2 \
source1 \
. \

View file

@ -0,0 +1,26 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../main.cpp
OBJS += \
./main.o
CPP_DEPS += \
./main.d
# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.cpp
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.cpp'
g++ -I../headers -O0 -g3 -Wall -c -fmessage-length=0 -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
g++ -MM -MG -P -w -I../headers -O0 -g3 -Wall -c -fmessage-length=0 "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '

View file

@ -0,0 +1,43 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: testSingleExe
# Tool invocations
testSingleExe: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: linker.gnu.c'
gcc -o"testSingleExe" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(OBJS)$(C_DEPS) testSingleExe
-@echo ' '
.PHONY: all clean dependents
.SECONDARY:
-include ../makefile.targets

View file

@ -0,0 +1,7 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS :=

View file

@ -0,0 +1,15 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
O_SRCS :=
C_SRCS :=
S_UPPER_SRCS :=
S_SRCS :=
OBJS :=
C_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
. \

View file

@ -0,0 +1,26 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../main.c
OBJS += \
./main.o
C_DEPS += \
./main.d
# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.c
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.c'
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0 "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '

View file

@ -0,0 +1,55 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: libtestDoubleSO.so
# Tool invocations
libtestDoubleSO.so: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: linker.gnu.cpp'
g++ -shared -o"libtestDoubleSO.so" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(OBJS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS) libtestDoubleSO.so
-@echo ' '
.PHONY: all clean dependents
.SECONDARY:
-include ../makefile.targets

View file

@ -0,0 +1,7 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS :=

View file

@ -0,0 +1,23 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
O_SRCS :=
CPP_SRCS :=
C_UPPER_SRCS :=
C_SRCS :=
S_UPPER_SRCS :=
S_SRCS :=
CXX_SRCS :=
CC_SRCS :=
OBJS :=
C_DEPS :=
CC_DEPS :=
CPP_DEPS :=
CXX_DEPS :=
C_UPPER_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
. \

View file

@ -0,0 +1,29 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../so1.c \
../so2.c
OBJS += \
./so1.o \
./so2.o
C_DEPS += \
./so1.d \
./so2.d
# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.c
@echo 'Building file: $<'
@echo 'Invoking: compiler.gnu.cpp'
g++ -DXXX -O0 -g3 -Wall -c -o"$@" "$<" && \
echo -n '$(@:%.o=%.d)' $(dir $@) > '$(@:%.o=%.d)' && \
g++ -MM -MG -P -w -DXXX -O0 -g3 -Wall -c "$<" >> '$(@:%.o=%.d)'
@echo 'Finished building: $<'
@echo ' '

View file

@ -38,6 +38,7 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.ui.dialogs.IOverwriteQuery;
public class ManagedProject21MakefileTests extends TestCase {
private IPath resourcesLocation = new Path(CTestPlugin.getFileInPlugin(new Path("resources/test21Projects/")).getAbsolutePath());
public static final String MBS_TEMP_DIR = "MBSTemp";
static boolean pathVariableCreated = false;
@ -56,7 +57,7 @@ public class ManagedProject21MakefileTests extends TestCase {
// TODO: testLinkedFolder fails intermittently saying that it cannot find
// the makefiles to compare. This appears to be a test set issue,
// rather than an MBS functionality issue
//suite.addTest(new ManagedProject21MakefileTests("testLinkedFolder"));
suite.addTest(new ManagedProject21MakefileTests("testLinkedFolder"));
return suite;
}
@ -69,7 +70,7 @@ public class ManagedProject21MakefileTests extends TestCase {
return null;
}
ArrayList projectList = null;
ArrayList<IProject> projectList = null;
if (containsZip) {
File projectZips[] = testDir.listFiles(new FileFilter(){
public boolean accept(File pathname){
@ -79,7 +80,7 @@ public class ManagedProject21MakefileTests extends TestCase {
}
});
projectList = new ArrayList(projectZips.length);
projectList = new ArrayList<IProject>(projectZips.length);
for(int i = 0; i < projectZips.length; i++){
try{
String projectName = projectZips[i].getName();
@ -104,12 +105,12 @@ public class ManagedProject21MakefileTests extends TestCase {
try{
IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
if(project != null)
projectList = new ArrayList(1);
projectList = new ArrayList<IProject>(1);
projectList.add(project);
} catch(Exception e){}
}
return (IProject[])projectList.toArray(new IProject[projectList.size()]);
return projectList.toArray(new IProject[projectList.size()]);
}
private IProject[] createProjects(String projName, IPath location, String projectTypeId, boolean containsZip) {
@ -119,10 +120,6 @@ public class ManagedProject21MakefileTests extends TestCase {
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);
@ -131,7 +128,7 @@ public class ManagedProject21MakefileTests extends TestCase {
return projects;
}
private boolean buildProjects(IProject projects[], IPath[] files) {
private boolean buildProjects(String benchmarkDir, IProject projects[], IPath[] files) {
if(projects == null || projects.length == 0)
return false;
@ -162,8 +159,11 @@ public class ManagedProject21MakefileTests extends TestCase {
if (i == 0) {
String configName = info.getDefaultConfiguration().getName();
IPath buildDir = Path.fromOSString(configName);
succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
}
// succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
IPath benchmarkLocationBase = resourcesLocation.append(benchmarkDir);
IPath buildLocation = curProject.getLocation().append(buildDir);
succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildLocation, files, benchmarkLocationBase);
}
}
}
}
@ -207,7 +207,9 @@ public class ManagedProject21MakefileTests extends TestCase {
} else {
fail("could not create the link to " + name);
}
} catch (Exception e) {fail("could not create the link to " + name);}
} catch (Exception e) {
fail("could not create the link to " + name + ": " + e);
}
}
/* (non-Javadoc)
@ -220,7 +222,7 @@ public class ManagedProject21MakefileTests extends TestCase {
Path.fromOSString("sources.mk"),
Path.fromOSString("subdir.mk")};
IProject[] projects = createProjects("singleFileExe", null, null, true);
buildProjects(projects, makefiles);
buildProjects("singleFileExe", projects, makefiles);
}
/* (non-Javadoc)
@ -233,7 +235,7 @@ public class ManagedProject21MakefileTests extends TestCase {
Path.fromOSString("sources.mk"),
Path.fromOSString("subdir.mk")};
IProject[] projects = createProjects("twoFileSO", null, null, true);
buildProjects(projects, makefiles);
buildProjects("twoFileSO", projects, makefiles);
}
/* (non-Javadoc)
@ -249,7 +251,7 @@ public class ManagedProject21MakefileTests extends TestCase {
Path.fromOSString("source2/subdir.mk"),
Path.fromOSString("source2/source21/subdir.mk")};
IProject[] projects = createProjects("multiResConfig", null, null, true);
buildProjects(projects, makefiles);
buildProjects("multiResConfig", projects, makefiles);
}
/* (non-Javadoc)
@ -278,7 +280,7 @@ public class ManagedProject21MakefileTests extends TestCase {
createFileLink(project, tmpDir, "f2link.c", "f2.c");
createFileLink(project, tmpDir, "test_ar.h", "test_ar.h");
// Build the project
succeeded = buildProjects(projects, makefiles);
succeeded = buildProjects("linkedLib", projects, makefiles);
} finally {
if (succeeded)
ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);
@ -315,7 +317,7 @@ public class ManagedProject21MakefileTests extends TestCase {
IPath location = Path.fromOSString(MBS_TEMP_DIR);
IProject[] projects = createProjects("linkedFolder", location, "cdt.managedbuild.target.testgnu21.lib", false);
// Build the project
succeeded = buildProjects(projects, makefiles);
succeeded = buildProjects("linkedFolder", projects, makefiles);
} finally {
if (succeeded)
ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);