Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2007-09-14 07:43:52 -0400
committerAnton Leherbauer2007-09-14 07:43:52 -0400
commit85f7e83870b62226f9f19d52c6f4628acb0d9a54 (patch)
treead663520f1b89ffbc155c900f44cebf70e618e5c /build/org.eclipse.cdt.make.core.tests
parent378af88ee384c4b48346761486585b0bdcfc5564 (diff)
downloadorg.eclipse.cdt-85f7e83870b62226f9f19d52c6f4628acb0d9a54.tar.gz
org.eclipse.cdt-85f7e83870b62226f9f19d52c6f4628acb0d9a54.tar.xz
org.eclipse.cdt-85f7e83870b62226f9f19d52c6f4628acb0d9a54.zip
Fix for 203059: [Scanner Discovery] Compiler commands within sh -c '...' are ignored (Patch by Gerhard Schaber)
Fix for 203104: GCCScannerInfoConsoleParser too strict when reading compilerCommands
Diffstat (limited to 'build/org.eclipse.cdt.make.core.tests')
-rw-r--r--build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/BaseBOPConsoleParserTests.java2
-rw-r--r--build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/GCCScannerInfoConsoleParserTests.java7
2 files changed, 7 insertions, 2 deletions
diff --git a/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/BaseBOPConsoleParserTests.java b/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/BaseBOPConsoleParserTests.java
index 07157eddf3..48a82db70c 100644
--- a/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/BaseBOPConsoleParserTests.java
+++ b/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/BaseBOPConsoleParserTests.java
@@ -128,7 +128,7 @@ public abstract class BaseBOPConsoleParserTests extends BaseTestCase {
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=203059
- public void _testCompilerCommandInsideShellInvocation_bug203059() throws Exception {
+ public void testCompilerCommandInsideShellInvocation_bug203059() throws Exception {
fOutputParser.processLine("sh -c '/usr/bin/gcc -DA test1.c'"); //$NON-NLS-1$
fOutputParser.processLine("sh -c '/usr/gcc-installs/gcc -DB test2.c;"); //$NON-NLS-1$
fOutputParser.processLine("sh -c '/usr/gcc/gcc -DC test3.c'"); //$NON-NLS-1$
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 4f5802f31d..a85c589908 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
@@ -63,6 +63,9 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
fOutputParser.processLine("gcc -I \\"); //$NON-NLS-1$
fOutputParser.processLine("/multiline\\"); //$NON-NLS-1$
fOutputParser.processLine("/dir -c test.c"); // multiline //$NON-NLS-1$
+ fOutputParser.processLine("gcc -Imultiline2 \\"); //$NON-NLS-1$
+ fOutputParser.processLine("-Imultiline3\\"); //$NON-NLS-1$
+ fOutputParser.processLine(" -DAA=\"BB\" test.c"); //$NON-NLS-1$
List sumIncludes = fCollector.getCollectedScannerInfo(null, ScannerInfoTypes.INCLUDE_PATHS);
assertTrue(sumIncludes.contains("/dir/include")); //$NON-NLS-1$
@@ -89,6 +92,8 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
assertTrue(sumIncludes.contains("//server5/include")); //$NON-NLS-1$
assertTrue(sumIncludes.contains("//server6/include")); //$NON-NLS-1$
assertTrue(sumIncludes.contains("/multiline/dir")); //$NON-NLS-1$
- assertTrue(sumIncludes.size() == 24);
+ assertTrue(sumIncludes.contains("multiline2")); //$NON-NLS-1$
+ assertTrue(sumIncludes.contains("multiline3")); //$NON-NLS-1$
+ assertTrue(sumIncludes.size() == 26);
}
}

Back to the top