mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Minor test updates
This commit is contained in:
parent
ff51abc278
commit
5be4c3e645
4 changed files with 14 additions and 7 deletions
Binary file not shown.
|
@ -224,7 +224,7 @@ public class ManagedBuildTestHelper {
|
|||
Assert.fail("Test failed on saving the ICDescriptor data: " + e.getLocalizedMessage()); }
|
||||
}
|
||||
|
||||
static public void compareBenchmarks(IProject project, IPath testDir, IPath[] files) {
|
||||
static public boolean compareBenchmarks(IProject project, IPath testDir, IPath[] files) {
|
||||
try {
|
||||
project.refreshLocal(IResource.DEPTH_INFINITE, null);
|
||||
} catch (Exception e) {
|
||||
|
@ -239,6 +239,7 @@ public class ManagedBuildTestHelper {
|
|||
Assert.fail("File " + testFile.lastSegment() + " does not match its benchmark.");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static public StringBuffer readContentsStripLineEnds(IProject project, IPath path) {
|
||||
|
|
|
@ -134,6 +134,7 @@ public class ManagedProject21MakefileTests extends TestCase {
|
|||
if(projects == null || projects.length == 0)
|
||||
return;
|
||||
|
||||
boolean succeeded = true;
|
||||
for(int i = 0; i < projects.length; i++){
|
||||
IProject curProject = projects[i];
|
||||
|
||||
|
@ -160,14 +161,16 @@ public class ManagedProject21MakefileTests extends TestCase {
|
|||
if (i == 0) {
|
||||
String configName = info.getDefaultConfiguration().getName();
|
||||
IPath buildDir = Path.fromOSString(configName);
|
||||
ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
|
||||
succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < projects.length; i++)
|
||||
ManagedBuildTestHelper.removeProject(projects[i].getName());
|
||||
if (succeeded) { // Otherwise leave the projects around for comparison
|
||||
for(int i = 0; i < projects.length; i++)
|
||||
ManagedBuildTestHelper.removeProject(projects[i].getName());
|
||||
}
|
||||
}
|
||||
|
||||
private void createPathVariable(IPath tmpDir) {
|
||||
|
|
|
@ -134,6 +134,7 @@ public class ManagedProject30MakefileTests extends TestCase {
|
|||
if(projects == null || projects.length == 0)
|
||||
return;
|
||||
|
||||
boolean succeeded = true;
|
||||
for(int i = 0; i < projects.length; i++){
|
||||
IProject curProject = projects[i];
|
||||
|
||||
|
@ -160,14 +161,16 @@ public class ManagedProject30MakefileTests extends TestCase {
|
|||
if (i == 0) {
|
||||
String configName = info.getDefaultConfiguration().getName();
|
||||
IPath buildDir = Path.fromOSString(configName);
|
||||
ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
|
||||
succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < projects.length; i++)
|
||||
ManagedBuildTestHelper.removeProject(projects[i].getName());
|
||||
if (succeeded) { // Otherwise leave the projects around for comparison
|
||||
for(int i = 0; i < projects.length; i++)
|
||||
ManagedBuildTestHelper.removeProject(projects[i].getName());
|
||||
}
|
||||
}
|
||||
|
||||
private void createPathVariable(IPath tmpDir) {
|
||||
|
|
Loading…
Add table
Reference in a new issue