Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2012-08-23 20:04:28 +0000
committerAndrew Gvozdev2013-05-02 13:03:06 +0000
commit6b0b057af39bf7f489b6975efa72fc5bfaa72e9b (patch)
treebeafd28ece3ccd13f264306b1ca81b3359ff2925
parent84b98695779c049fc222c9420f86934a2cc591df (diff)
downloadorg.eclipse.cdt-6b0b057af39bf7f489b6975efa72fc5bfaa72e9b.tar.gz
org.eclipse.cdt-6b0b057af39bf7f489b6975efa72fc5bfaa72e9b.tar.xz
org.eclipse.cdt-6b0b057af39bf7f489b6975efa72fc5bfaa72e9b.zip
bug 387729: GCCScannerInfoConsoleParserTests fails consistently for me
-rw-r--r--build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/GCCScannerInfoConsoleParserTests.java10
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java3
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java3
3 files changed, 7 insertions, 9 deletions
diff --git a/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/GCCScannerInfoConsoleParserTests.java b/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/GCCScannerInfoConsoleParserTests.java
index a5895442b59..2697061d7f0 100644
--- a/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/GCCScannerInfoConsoleParserTests.java
+++ b/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/GCCScannerInfoConsoleParserTests.java
@@ -21,11 +21,11 @@ import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerInfoConsol
/**
* Scanner configuration console parser tests
- *
+ *
* @author vhirsl
*/
public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests {
-
+
public static TestSuite suite() {
return suite(GCCScannerInfoConsoleParserTests.class);
}
@@ -46,10 +46,10 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
super.tearDown();
fOutputParser.shutdown();
}
-
+
/*
* 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() {
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("-Imultiline3\\"); //$NON-NLS-1$
fOutputParser.processLine(" -DAA=\"BB\" test.c"); //$NON-NLS-1$
-
+
@SuppressWarnings("unchecked")
List<String> sumIncludes = fCollector.getCollectedScannerInfo(null, ScannerInfoTypes.INCLUDE_PATHS);
assertTrue(sumIncludes.contains("/dir/include")); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
index 32b9a9edc81..0d6a5067c8e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
@@ -94,8 +94,7 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
*/
@Override
public boolean processLine(String line) {
- line= line.trim();
- if (line.length() == 0) {
+ if (line.trim().length() == 0) {
return false;
}
boolean rc = false;
diff --git a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java
index 64ed3c4c08e..fc33db47104 100644
--- a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java
+++ b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java
@@ -110,8 +110,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
*/
@Override
public boolean processLine(String line) {
- line= line.trim();
- if (line.length() == 0) {
+ if (line.trim().length() == 0) {
return false;
}

Back to the top