mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
bug 387729: GCCScannerInfoConsoleParserTests fails consistently for me
This commit is contained in:
parent
84b9869577
commit
6b0b057af3
3 changed files with 7 additions and 9 deletions
|
@ -21,11 +21,11 @@ import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerInfoConsol
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scanner configuration console parser tests
|
* Scanner configuration console parser tests
|
||||||
*
|
*
|
||||||
* @author vhirsl
|
* @author vhirsl
|
||||||
*/
|
*/
|
||||||
public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests {
|
public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests {
|
||||||
|
|
||||||
public static TestSuite suite() {
|
public static TestSuite suite() {
|
||||||
return suite(GCCScannerInfoConsoleParserTests.class);
|
return suite(GCCScannerInfoConsoleParserTests.class);
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,10 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
fOutputParser.shutdown();
|
fOutputParser.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tests GCCScannerInfoConsoleParser. Utility object not provided.
|
* Tests GCCScannerInfoConsoleParser. Utility object not provided.
|
||||||
* Only tests parsing of the input (make build output)
|
* Only tests parsing of the input (make build output)
|
||||||
*/
|
*/
|
||||||
public void testParsingIncludePaths() {
|
public void testParsingIncludePaths() {
|
||||||
fOutputParser.processLine("gcc -I /dir/include -I c:\\dir\\include -ID:/dir/include -c test.c"); // absolute paths //$NON-NLS-1$
|
fOutputParser.processLine("gcc -I /dir/include -I c:\\dir\\include -ID:/dir/include -c test.c"); // absolute paths //$NON-NLS-1$
|
||||||
|
@ -68,7 +68,7 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
|
||||||
fOutputParser.processLine("gcc -Imultiline2 \\"); //$NON-NLS-1$
|
fOutputParser.processLine("gcc -Imultiline2 \\"); //$NON-NLS-1$
|
||||||
fOutputParser.processLine("-Imultiline3\\"); //$NON-NLS-1$
|
fOutputParser.processLine("-Imultiline3\\"); //$NON-NLS-1$
|
||||||
fOutputParser.processLine(" -DAA=\"BB\" test.c"); //$NON-NLS-1$
|
fOutputParser.processLine(" -DAA=\"BB\" test.c"); //$NON-NLS-1$
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<String> sumIncludes = fCollector.getCollectedScannerInfo(null, ScannerInfoTypes.INCLUDE_PATHS);
|
List<String> sumIncludes = fCollector.getCollectedScannerInfo(null, ScannerInfoTypes.INCLUDE_PATHS);
|
||||||
assertTrue(sumIncludes.contains("/dir/include")); //$NON-NLS-1$
|
assertTrue(sumIncludes.contains("/dir/include")); //$NON-NLS-1$
|
||||||
|
|
|
@ -94,8 +94,7 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean processLine(String line) {
|
public boolean processLine(String line) {
|
||||||
line= line.trim();
|
if (line.trim().length() == 0) {
|
||||||
if (line.length() == 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
boolean rc = false;
|
boolean rc = false;
|
||||||
|
|
|
@ -110,8 +110,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean processLine(String line) {
|
public boolean processLine(String line) {
|
||||||
line= line.trim();
|
if (line.trim().length() == 0) {
|
||||||
if (line.length() == 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue