summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/rootfs.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 5f1f7b3e5d..48e5754b27 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -44,15 +44,14 @@ class Rootfs(object):
44 r = re.compile('^(warn|Warn|NOTE: warn|NOTE: Warn|WARNING:)') 44 r = re.compile('^(warn|Warn|NOTE: warn|NOTE: Warn|WARNING:)')
45 log_path = self.d.expand("${T}/log.do_rootfs") 45 log_path = self.d.expand("${T}/log.do_rootfs")
46 with open(log_path, 'r') as log: 46 with open(log_path, 'r') as log:
47 for line in log.read().split('\n'): 47 for line in log:
48 if 'log_check' in line or 'NOTE:' in line: 48 if 'log_check' in line or 'NOTE:' in line:
49 continue 49 continue
50 50
51 m = r.search(line) 51 m = r.search(line)
52 if m: 52 if m:
53 bb.warn('log_check: There is a warn message in the logfile') 53 bb.warn('[log_check] %s: found a warning message in the logfile (keyword \'%s\'):\n[log_check] %s'
54 bb.warn('log_check: Matched keyword: [%s]' % m.group()) 54 % (self.d.getVar('PN', True), m.group(), line))
55 bb.warn('log_check: %s\n' % line)
56 55
57 def _log_check_error(self): 56 def _log_check_error(self):
58 r = re.compile(self.log_check_regex) 57 r = re.compile(self.log_check_regex)
@@ -60,15 +59,15 @@ class Rootfs(object):
60 with open(log_path, 'r') as log: 59 with open(log_path, 'r') as log:
61 found_error = 0 60 found_error = 0
62 message = "\n" 61 message = "\n"
63 for line in log.read().split('\n'): 62 for line in log:
64 if 'log_check' in line: 63 if 'log_check' in line:
65 continue 64 continue
66 65
67 m = r.search(line) 66 m = r.search(line)
68 if m: 67 if m:
69 found_error = 1 68 found_error = 1
70 bb.warn('log_check: There were error messages in the logfile') 69 bb.warn('[log_check] %s: found an error message in the logfile (keyword \'%s\'):\n[log_check] %s'
71 bb.warn('log_check: Matched keyword: [%s]\n\n' % m.group()) 70 % (self.d.getVar('PN', True), m.group(), line))
72 71
73 if found_error >= 1 and found_error <= 5: 72 if found_error >= 1 and found_error <= 5:
74 message += line + '\n' 73 message += line + '\n'