]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
diff-log-helper: group lines starting with "make:"
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 4 Dec 2013 09:38:26 +0000 (11:38 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 4 Dec 2013 09:38:26 +0000 (11:38 +0200)
Thie makes the diff look a tiny bit nice when there is a build failure.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
aiaiai-diff-log-helper

index 464f6b92b43e8bdbdac7d56c2e919ced13049b99..23723914b64b9c1df986193d5dfe909123456e40 100755 (executable)
@@ -10,7 +10,7 @@ Licence: GPLv2
 
 # Sorts 2 build logs and compares them. Blocks can be as follows.
 #
-# 1. All consequitive lines starting with the same file prefix belong to one
+# 1a. All consequitive lines starting with the same file prefix belong to one
 # block, e.g.:
 #
 # drivers/s.c:472:22: warning: incorrect type in assignment (different address spaces) [sparse]
@@ -19,6 +19,9 @@ Licence: GPLv2
 #
 # (the prefix is "drivers/s.c:472")
 #
+# 1b. All consequitive lines starting with prefix "make:", "make[1]:", etc.
+# These usually belong to build failures.
+#
 # 2. GCC 'In file included from' blocks look like this:
 #
 # In file included from include/linux/kernel.h:17:0,
@@ -75,12 +78,18 @@ def gen_blocks(stream):
             btype = "infunc"
             prefix = ""
             block = [line]
-        # file prefixed block (case 1.)
+        # file prefixed block (case 1a.)
         elif re.match("^[^\s]+/[^\s]+:\d+:", line):
             yield block
             prefix = ":".join(line.split(':')[:2])
             btype = "prefix"
             block = [line]
+        # file prefixed block (case 1b.)
+        elif re.match("^make(\[\d+\]){0,1}:", line):
+            yield block
+            prefix = line.split(':')[0]
+            btype = "prefix"
+            block = [line]
         # the rest (case 4.)
         else:
             yield block