fix error parser bug 9091
authortimkelly
Thu, 21 May 2009 16:06:46 -0500
changeset 187 fde39ed1f109
parent 186 7e54d0e1a873
child 188 8e3c92a97802
fix error parser bug 9091
builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java
--- a/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt	Thu May 21 11:41:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt	Thu May 21 16:06:46 2009 -0500
@@ -5,6 +5,9 @@
 </info>
 <info>Making J:/epoc32/build/Cone/makefile.default</info>
 
+<info>Regression for bug 9091. Don't report info lines with SBSv2 error checker</info>
+<info>Could not write toolcheck cache: [Errno 2] No such file or directory: u'R:\\\\epoc32\\build\\toolcheck_cache__armv5_udeb.tmp'</info>
+
 <info>Executing 'make -r -f "J:/epoc32/build/Cone/makefile.default" -j 4
 DESCRAMBLE="C:/Symbian/SITK/sbs/bin/sbs_descramble.exe sbs2631027042"'</info>
 
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java	Thu May 21 11:41:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java	Thu May 21 16:06:46 2009 -0500
@@ -26,6 +26,7 @@
 
 	private static final Pattern warningPattern = Pattern.compile("<warning>(.*)</warning>"); //$NON-NLS-1$
 	private static final Pattern errorPattern = Pattern.compile("<error>(.*)</error>"); //$NON-NLS-1$
+	private static final Pattern infoPattern = Pattern.compile("<info>(.*)</info>"); //$NON-NLS-1$
 
 	public SBSv2ErrorParser() {
 	}
@@ -34,7 +35,11 @@
 
 		initialise();
 		
-		Matcher matcher = warningPattern.matcher(line);
+		Matcher matcher = infoPattern.matcher(line);
+		if (matcher.matches()) {
+			return true; // just ignore info messages
+		}
+		matcher = warningPattern.matcher(line);
 		if (matcher.matches()) {
 			// strip the tags
 			String text = line.substring("<warning>".length(), line.length() - "</warning>".length()); //$NON-NLS-1$ //$NON-NLS-2$