mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
Patch for Vladimir Hirsl.
This patch adds some missing source folders to the ui.tests library.
This commit is contained in:
parent
b73e87b69b
commit
d45de32ff5
13 changed files with 229 additions and 42 deletions
|
@ -4,11 +4,11 @@
|
||||||
<classpathentry kind="src" path="ui/"/>
|
<classpathentry kind="src" path="ui/"/>
|
||||||
<classpathentry kind="src" path="core/"/>
|
<classpathentry kind="src" path="core/"/>
|
||||||
<classpathentry kind="src" path="model/"/>
|
<classpathentry kind="src" path="model/"/>
|
||||||
<classpathentry kind="src" path="build"/>
|
<classpathentry kind="src" path="build/"/>
|
||||||
<classpathentry kind="src" path="parser"/>
|
<classpathentry kind="src" path="parser/"/>
|
||||||
<classpathentry kind="src" path="failures"/>
|
<classpathentry kind="src" path="failures/"/>
|
||||||
|
<classpathentry kind="src" path="suite/"/>
|
||||||
<classpathentry kind="src" path="/org.apache.xerces"/>
|
<classpathentry kind="src" path="/org.apache.xerces"/>
|
||||||
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
|
|
||||||
<classpathentry kind="src" path="/org.eclipse.core.resources"/>
|
<classpathentry kind="src" path="/org.eclipse.core.resources"/>
|
||||||
<classpathentry kind="src" path="/org.eclipse.core.runtime"/>
|
<classpathentry kind="src" path="/org.eclipse.core.runtime"/>
|
||||||
<classpathentry kind="src" path="/org.eclipse.cdt.core"/>
|
<classpathentry kind="src" path="/org.eclipse.cdt.core"/>
|
||||||
|
@ -20,8 +20,7 @@
|
||||||
<classpathentry kind="src" path="/org.eclipse.swt"/>
|
<classpathentry kind="src" path="/org.eclipse.swt"/>
|
||||||
<classpathentry kind="src" path="/org.eclipse.ui"/>
|
<classpathentry kind="src" path="/org.eclipse.ui"/>
|
||||||
<classpathentry kind="src" path="/org.junit"/>
|
<classpathentry kind="src" path="/org.junit"/>
|
||||||
<classpathentry kind="src" path="/org.eclipse.update.core"/>
|
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="src" path="suite"/>
|
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
<project>org.eclipse.core.runtime</project>
|
<project>org.eclipse.core.runtime</project>
|
||||||
<project>org.eclipse.swt</project>
|
<project>org.eclipse.swt</project>
|
||||||
<project>org.eclipse.ui</project>
|
<project>org.eclipse.ui</project>
|
||||||
<project>org.eclipse.update.core</project>
|
|
||||||
<project>org.junit</project>
|
<project>org.junit</project>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
Added testPointersToMembers() and testPointersToMemberFunctions() to DOMTests.
|
Added testPointersToMembers() and testPointersToMemberFunctions() to DOMTests.
|
||||||
Added testBug36290() and testBug36931() to DOMTests.
|
Added testBug36290() and testBug36931() to DOMTests.
|
||||||
|
|
||||||
|
2003-06-16 Vladimir Hirsl
|
||||||
|
Added /build, /parser, /failures and /suite directories to the library.
|
||||||
|
Copied resources from /model/org.eclipse.cdt.core.model.tests.resources
|
||||||
|
to /model/org/clipse/cdt/core/model/tests/resources/cmodel.
|
||||||
|
Added class AISResultPrinter to format test results.
|
||||||
|
Class AutomatedIntegrationSuite now implements IPlatformRunnable.
|
||||||
|
|
||||||
2003-06-13 John Camelon
|
2003-06-13 John Camelon
|
||||||
Added Class/Base infrastructure to public interfaces & requestor callback.
|
Added Class/Base infrastructure to public interfaces & requestor callback.
|
||||||
Moved many internal interfaces to external packages.
|
Moved many internal interfaces to external packages.
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
source.cdtuitests.jar = src/,\
|
source.cdtuitests.jar = src/,\
|
||||||
ui/,\
|
ui/,\
|
||||||
core/,\
|
core/,\
|
||||||
model/
|
model/,\
|
||||||
|
build/,\
|
||||||
|
parser/,\
|
||||||
|
failures/,\
|
||||||
|
suite/
|
||||||
bin.includes = plugin.xml,\
|
bin.includes = plugin.xml,\
|
||||||
about.html,\
|
about.html,\
|
||||||
plugin.properties,\
|
plugin.properties,\
|
||||||
test.xml
|
test.xml
|
||||||
about.html
|
|
||||||
src.includes = plugin.xml,\
|
src.includes = plugin.xml,\
|
||||||
about.html,\
|
about.html,\
|
||||||
plugin.properties,\
|
plugin.properties,\
|
||||||
test.xml
|
test.xml
|
||||||
|
about.html =
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class IIncludeTests extends IntegratedCModelTest {
|
||||||
* @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
|
* @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
|
||||||
*/
|
*/
|
||||||
public String getSourcefileSubdir() {
|
public String getSourcefileSubdir() {
|
||||||
return "model/org.eclipse.cdt.core.model.tests.resources/";
|
return "model/org/eclipse/cdt/core/model/tests/resources/cmodel/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class IMacroTests extends IntegratedCModelTest {
|
||||||
* @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
|
* @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
|
||||||
*/
|
*/
|
||||||
public String getSourcefileSubdir() {
|
public String getSourcefileSubdir() {
|
||||||
return "model/org.eclipse.cdt.core.model.tests.resources/";
|
return "model/org/eclipse/cdt/core/model/tests/resources/cmodel/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class IStructureTests extends IntegratedCModelTest {
|
||||||
* @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
|
* @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
|
||||||
*/
|
*/
|
||||||
public String getSourcefileSubdir() {
|
public String getSourcefileSubdir() {
|
||||||
return "model/org.eclipse.cdt.core.model.tests.resources/";
|
return "model/org/eclipse/cdt/core/model/tests/resources/cmodel/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
// include
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "whatever.h"
|
||||||
|
#include <src/slash.h>
|
||||||
|
#include <src\backslash.h>
|
||||||
|
#include "Program Files/space.h"
|
||||||
|
#include "../up1dir.h"
|
||||||
|
#include "./samedir.h"
|
||||||
|
#include "different_extension1.hpp"
|
||||||
|
#include "different_extension2.hh"
|
||||||
|
#include "different_extension3.x"
|
||||||
|
#include <no_extension>
|
||||||
|
# include "whitespace_after_hash"
|
||||||
|
#include "whitespace_before_hash"
|
||||||
|
|
||||||
|
// failure cases:
|
||||||
|
#include garbage
|
||||||
|
#include "resync_after_bad_parse_1"
|
||||||
|
#include
|
||||||
|
#include "resync_after_bad_parse_2"
|
||||||
|
#include "one" "two" "three"
|
||||||
|
#include "resync_after_bad_parse_3"
|
||||||
|
|
||||||
|
// from the Spec:
|
||||||
|
|
||||||
|
// from [C, 6.10.p8]
|
||||||
|
// should fail
|
||||||
|
#define EMPTY
|
||||||
|
EMPTY #include "invalid.h"
|
||||||
|
|
||||||
|
// from [C, 6.10.2.p8]:
|
||||||
|
// should equal #include "myInclude1.h"
|
||||||
|
#define MYINCFILE "myInclude1.h"
|
||||||
|
#include MYINCFILE
|
||||||
|
|
||||||
|
// from [C, 6.10.3.5.p6]:
|
||||||
|
// should equal #include "vers2.h"
|
||||||
|
#define INCFILE(x) vers ## x
|
||||||
|
#define xstr(x) str(x)
|
||||||
|
#define str(x) #x
|
||||||
|
#include xstr(INCFILE(2)).h
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
// macro
|
||||||
|
#define SINGLETON
|
||||||
|
#define NUMBER 1
|
||||||
|
#define PRINT(string,msg) printf(string, msg)
|
|
@ -0,0 +1,4 @@
|
||||||
|
// IStructure
|
||||||
|
struct foo {
|
||||||
|
int bar;
|
||||||
|
};
|
|
@ -2,7 +2,7 @@
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.cdt.ui.tests"
|
id="org.eclipse.cdt.ui.tests"
|
||||||
name="org.eclipse.cdt.ui.tests"
|
name="org.eclipse.cdt.ui.tests"
|
||||||
version="1.1.0"
|
version="1.2.0.5"
|
||||||
class="org.eclipse.cdt.testplugin.CTestPlugin">
|
class="org.eclipse.cdt.testplugin.CTestPlugin">
|
||||||
|
|
||||||
<runtime>
|
<runtime>
|
||||||
|
@ -12,7 +12,6 @@
|
||||||
</runtime>
|
</runtime>
|
||||||
<requires>
|
<requires>
|
||||||
<import plugin="org.apache.xerces"/>
|
<import plugin="org.apache.xerces"/>
|
||||||
<import plugin="org.eclipse.core.boot"/>
|
|
||||||
<import plugin="org.eclipse.core.resources"/>
|
<import plugin="org.eclipse.core.resources"/>
|
||||||
<import plugin="org.eclipse.core.runtime"/>
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
<import plugin="org.eclipse.cdt.core"/>
|
<import plugin="org.eclipse.cdt.core"/>
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
<import plugin="org.eclipse.swt"/>
|
<import plugin="org.eclipse.swt"/>
|
||||||
<import plugin="org.eclipse.ui"/>
|
<import plugin="org.eclipse.ui"/>
|
||||||
<import plugin="org.junit"/>
|
<import plugin="org.junit"/>
|
||||||
<import plugin="org.eclipse.update.core"/>
|
|
||||||
</requires>
|
</requires>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
/*
|
||||||
|
* Created on Jun 5, 2003
|
||||||
|
*
|
||||||
|
* To change the template for this generated file go to
|
||||||
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.core.suite;
|
||||||
|
|
||||||
|
import java.io.PrintStream;
|
||||||
|
|
||||||
|
import junit.framework.AssertionFailedError;
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.textui.ResultPrinter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author vhirsl
|
||||||
|
*
|
||||||
|
* To change the template for this generated type comment go to
|
||||||
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
|
*/
|
||||||
|
public class AISResultPrinter extends ResultPrinter {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param writer
|
||||||
|
*/
|
||||||
|
public AISResultPrinter(PrintStream writer) {
|
||||||
|
super(writer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see junit.framework.TestListener#addFailure(junit.framework.Test, junit.framework.AssertionFailedError)
|
||||||
|
*/
|
||||||
|
public void addFailure(Test test, AssertionFailedError t) {
|
||||||
|
super.addFailure(test, t);
|
||||||
|
getWriter().print("---> ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see junit.framework.TestListener#addError(junit.framework.Test, java.lang.Throwable)
|
||||||
|
*/
|
||||||
|
public void addError(Test test, Throwable t) {
|
||||||
|
super.addError(test, t);
|
||||||
|
getWriter().print("---> ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see junit.framework.TestListener#startTest(junit.framework.Test)
|
||||||
|
*/
|
||||||
|
public void startTest(Test test) {
|
||||||
|
getWriter().print(".");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -12,8 +12,12 @@ import junit.framework.TestSuite;
|
||||||
import junit.framework.TestResult;
|
import junit.framework.TestResult;
|
||||||
import junit.framework.TestListener;
|
import junit.framework.TestListener;
|
||||||
import junit.framework.AssertionFailedError;
|
import junit.framework.AssertionFailedError;
|
||||||
|
import junit.textui.TestRunner;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.eclipse.core.boot.IPlatformRunnable;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.build.managed.tests.AllBuildTests;
|
import org.eclipse.cdt.core.build.managed.tests.AllBuildTests;
|
||||||
import org.eclipse.cdt.core.model.tests.AllCoreTests;
|
import org.eclipse.cdt.core.model.tests.AllCoreTests;
|
||||||
|
@ -30,13 +34,11 @@ import org.eclipse.cdt.core.model.failedTests.*;
|
||||||
* To change the template for this generated type comment go to
|
* To change the template for this generated type comment go to
|
||||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
*/
|
*/
|
||||||
public class AutomatedIntegrationSuite extends TestSuite implements TestListener {
|
public class AutomatedIntegrationSuite extends TestSuite
|
||||||
|
implements TestListener, IPlatformRunnable {
|
||||||
|
|
||||||
|
private TestResult testResult = null;
|
||||||
private String currentTestName;
|
private String currentTestName;
|
||||||
// Statistical information
|
|
||||||
private int numberOfRuns = 0;
|
|
||||||
private int numberOfFailures = 0;
|
|
||||||
private int numberOfErrors = 0;
|
|
||||||
// success tests
|
// success tests
|
||||||
private int numberOfSuccessTests = 0;
|
private int numberOfSuccessTests = 0;
|
||||||
private int numberOfFailedSuccessTests = 0;
|
private int numberOfFailedSuccessTests = 0;
|
||||||
|
@ -65,6 +67,9 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
final AutomatedIntegrationSuite suite = new AutomatedIntegrationSuite();
|
final AutomatedIntegrationSuite suite = new AutomatedIntegrationSuite();
|
||||||
|
|
||||||
|
// First test to trigger report generation
|
||||||
|
suite.addTest(suite.new GenerateReport("startSuccessTests"));
|
||||||
|
|
||||||
// Add all success tests
|
// Add all success tests
|
||||||
suite.addTest(AllBuildTests.suite());
|
suite.addTest(AllBuildTests.suite());
|
||||||
suite.addTest(ParserTestSuite.suite());
|
suite.addTest(ParserTestSuite.suite());
|
||||||
|
@ -93,6 +98,8 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
* Overloaded method
|
* Overloaded method
|
||||||
*/
|
*/
|
||||||
public void run(TestResult result) {
|
public void run(TestResult result) {
|
||||||
|
// To get counts from the result
|
||||||
|
testResult = result;
|
||||||
// Add oneself as a listener
|
// Add oneself as a listener
|
||||||
result.addListener(this);
|
result.addListener(this);
|
||||||
// Call a base class method
|
// Call a base class method
|
||||||
|
@ -106,27 +113,25 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
* An error occurred.
|
* An error occurred.
|
||||||
*/
|
*/
|
||||||
public void addError(Test test, Throwable t) {
|
public void addError(Test test, Throwable t) {
|
||||||
++numberOfErrors;
|
// System.out.println("Error : " + test);
|
||||||
System.out.println("Error : " + test);
|
// System.out.println("\tReason : " + t);
|
||||||
System.out.println("\tReason : " + t);
|
// System.out.println("\tStack trace : ");
|
||||||
System.out.println("\tStack trace : ");
|
// t.printStackTrace(System.out);
|
||||||
t.printStackTrace(System.out);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* A failure occurred.
|
* A failure occurred.
|
||||||
*/
|
*/
|
||||||
public void addFailure(Test test, AssertionFailedError t) {
|
public void addFailure(Test test, AssertionFailedError t) {
|
||||||
++numberOfFailures;
|
|
||||||
if (failedTests) {
|
if (failedTests) {
|
||||||
++numberOfFailedFailedTests;
|
++numberOfFailedFailedTests;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
++numberOfFailedSuccessTests;
|
++numberOfFailedSuccessTests;
|
||||||
}
|
}
|
||||||
System.out.println("Failure : " + test);
|
// System.out.println("Failure : " + test);
|
||||||
System.out.println("\tReason : " + t);
|
// System.out.println("\tReason : " + t);
|
||||||
System.out.println("\tStackTrace : ");
|
// System.out.println("\tStackTrace : ");
|
||||||
t.printStackTrace(System.out);
|
// t.printStackTrace(System.out);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* A test ended.
|
* A test ended.
|
||||||
|
@ -140,15 +145,14 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
skipTest = false;
|
skipTest = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
++numberOfRuns;
|
|
||||||
if (failedTests) {
|
if (failedTests) {
|
||||||
++numberOfFailedTests;
|
++numberOfFailedTests;
|
||||||
System.out.println(test);
|
// System.out.println(test);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
++numberOfSuccessTests;
|
++numberOfSuccessTests;
|
||||||
}
|
}
|
||||||
// System.out.println(test);
|
System.out.println(test);
|
||||||
}
|
}
|
||||||
currentTestName = null;
|
currentTestName = null;
|
||||||
}
|
}
|
||||||
|
@ -174,11 +178,17 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
*/
|
*/
|
||||||
protected void generateReport() {
|
protected void generateReport() {
|
||||||
System.out.println("\n*** Generating report: ***\n");
|
int numberOfRuns = testResult.runCount();
|
||||||
|
int numberOfFailures = testResult.failureCount();
|
||||||
|
int numberOfErrors = testResult.errorCount();
|
||||||
|
|
||||||
|
System.out.println();
|
||||||
|
System.out.println("*** Generating report: ***");
|
||||||
|
System.out.println();
|
||||||
System.out.println("\tNumber of runs: " + numberOfRuns);
|
System.out.println("\tNumber of runs: " + numberOfRuns);
|
||||||
System.out.println("\tNumber of failures: " + numberOfFailures);
|
System.out.println("\tNumber of failures: " + numberOfFailures);
|
||||||
System.out.println("\tNumber of errors: " + numberOfErrors);
|
System.out.println("\tNumber of errors: " + numberOfErrors);
|
||||||
float successRate = (numberOfRuns-numberOfFailures)/(float)numberOfRuns;
|
float successRate = (numberOfRuns-numberOfFailures-numberOfErrors)/(float)numberOfRuns;
|
||||||
DecimalFormat df = new DecimalFormat("##.##%");
|
DecimalFormat df = new DecimalFormat("##.##%");
|
||||||
System.out.println("Sanity success rate : " + df.format(successRate));
|
System.out.println("Sanity success rate : " + df.format(successRate));
|
||||||
System.out.println("\tNumber of success tests: " + numberOfSuccessTests);
|
System.out.println("\tNumber of success tests: " + numberOfSuccessTests);
|
||||||
|
@ -189,12 +199,23 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
(float)(numberOfSuccessTests+numberOfFailedTests-numberOfFailedFailedTests);
|
(float)(numberOfSuccessTests+numberOfFailedTests-numberOfFailedFailedTests);
|
||||||
System.out.print("Observed success test rate : " + df.format(successRate));
|
System.out.print("Observed success test rate : " + df.format(successRate));
|
||||||
System.out.println(" (failed success tests = " + numberOfFailedSuccessTests + ", failed failed tests = " + numberOfFailedFailedTests + ")");
|
System.out.println(" (failed success tests = " + numberOfFailedSuccessTests + ", failed failed tests = " + numberOfFailedFailedTests + ")");
|
||||||
|
System.out.println();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startSuccessTests() {
|
||||||
|
failedTests = false;
|
||||||
|
System.out.println();
|
||||||
|
System.out.println("*** Starting success tests ***");
|
||||||
|
System.out.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startFailedTests() {
|
private void startFailedTests() {
|
||||||
failedTests = true;
|
failedTests = true;
|
||||||
System.out.println("\n*** Starting failed tests ***\n");
|
System.out.println();
|
||||||
|
System.out.println("*** Starting failed tests ***");
|
||||||
|
System.out.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Public inner class to invoke generateReport
|
* Public inner class to invoke generateReport
|
||||||
*
|
*
|
||||||
|
@ -217,6 +238,14 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
AutomatedIntegrationSuite.this.generateReport();
|
AutomatedIntegrationSuite.this.generateReport();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void startSuccessTests() {
|
||||||
|
// skip this one
|
||||||
|
AutomatedIntegrationSuite.this.skipTest = true;
|
||||||
|
|
||||||
|
// Calls a method of the outer class
|
||||||
|
AutomatedIntegrationSuite.this.startSuccessTests();
|
||||||
|
}
|
||||||
|
|
||||||
public void startFailedTests() {
|
public void startFailedTests() {
|
||||||
// skip this one
|
// skip this one
|
||||||
AutomatedIntegrationSuite.this.skipTest = true;
|
AutomatedIntegrationSuite.this.skipTest = true;
|
||||||
|
@ -224,5 +253,54 @@ public class AutomatedIntegrationSuite extends TestSuite implements TestListener
|
||||||
// Calls a method of the outer class
|
// Calls a method of the outer class
|
||||||
AutomatedIntegrationSuite.this.startFailedTests();
|
AutomatedIntegrationSuite.this.startFailedTests();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see junit.framework.Test#countTestCases()
|
||||||
|
* We don't want these test cases to be counted
|
||||||
|
*/
|
||||||
|
public int countTestCases() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.boot.IPlatformRunnable#run(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object run(Object args) throws Exception {
|
||||||
|
// Used when started from as a regression test suite after the build
|
||||||
|
TestRunner testRunner = new TestRunner(new AISResultPrinter(System.out));
|
||||||
|
TestResult testResult = testRunner.doRun(suite());
|
||||||
|
|
||||||
|
return prepareReport(testResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ArrayList prepareReport(TestResult testResult) {
|
||||||
|
// TestRunner.run(suite());
|
||||||
|
ArrayList efMessages = new ArrayList();
|
||||||
|
int errorCount = testResult.errorCount();
|
||||||
|
int failureCount = testResult.failureCount();
|
||||||
|
if (errorCount > 0) {
|
||||||
|
String em = new String("There ");
|
||||||
|
em += (errorCount == 1)?"is ":"are ";
|
||||||
|
em += Integer.toString(errorCount);
|
||||||
|
em += " error";
|
||||||
|
em += (errorCount == 1)?"!":"s!";
|
||||||
|
efMessages.add(em);
|
||||||
|
}
|
||||||
|
if (failureCount > 0) {
|
||||||
|
String fm = new String("There ");
|
||||||
|
fm += (failureCount == 1)?"is ":"are ";
|
||||||
|
fm += Integer.toString(failureCount);
|
||||||
|
fm += " failure";
|
||||||
|
fm += (failureCount == 1)?"!":"s!";
|
||||||
|
efMessages.add(fm);
|
||||||
|
}
|
||||||
|
if (efMessages.isEmpty()) {
|
||||||
|
efMessages.add(new String("Regression test run SUCCESSFUL!"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
efMessages.add(new String("Please see raw test suite output for details."));
|
||||||
|
}
|
||||||
|
return efMessages;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue