summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-12-04 11:38:26 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-12-04 11:38:26 +0200
commiteea484b7901112084cec144e7ae0c8211f9b7c69 (patch)
tree2f9f41939d9b267180a8935111352918eb9ed018
parent41acd072c6fdfef2e8424b3dbdeea67d22a1b4a0 (diff)
downloadaiaiai-eea484b7901112084cec144e7ae0c8211f9b7c69.tar.gz
diff-log-helper: group lines starting with "make:"
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>
-rwxr-xr-xaiaiai-diff-log-helper13
1 files changed, 11 insertions, 2 deletions
diff --git a/aiaiai-diff-log-helper b/aiaiai-diff-log-helper
index 464f6b9..2372391 100755
--- a/aiaiai-diff-log-helper
+++ b/aiaiai-diff-log-helper
@@ -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