diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2016-05-19 00:28:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-19 22:32:07 +0100 |
commit | 79d177822bca8049f7dc55924cf0548d22be4bcf (patch) | |
tree | 85e09ad45d9a3f688701b1a74fa4cc54fe1b5cd5 /meta/lib/oe/rootfs.py | |
parent | e3e8d500e25788db54ea96b080e73fd325d1d414 (diff) | |
download | poky-79d177822bca8049f7dc55924cf0548d22be4bcf.tar.gz |
rootfs.py: Exclude lines in _log_check_warn() as well
This will make _log_check_warn() exclude the same lines as
_log_check_error() does.
(From OE-Core rev: 85f64c68278f797c6f73f002f63d7f46fe80aef4)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/rootfs.py')
-rw-r--r-- | meta/lib/oe/rootfs.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 63ca22f311..741399adc2 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
@@ -41,11 +41,22 @@ class Rootfs(object): | |||
41 | pass | 41 | pass |
42 | 42 | ||
43 | def _log_check_warn(self): | 43 | def _log_check_warn(self): |
44 | # Ignore any lines containing log_check to avoid recursion, and ignore | ||
45 | # lines beginning with a + since sh -x may emit code which isn't | ||
46 | # actually executed, but may contain error messages | ||
47 | excludes = [ 'log_check', r'^\+' ] | ||
48 | if hasattr(self, 'log_check_expected_regexes'): | ||
49 | excludes.extend(self.log_check_expected_regexes) | ||
50 | excludes = [re.compile(x) for x in excludes] | ||
44 | r = re.compile('^(warn|Warn|WARNING:)') | 51 | r = re.compile('^(warn|Warn|WARNING:)') |
45 | log_path = self.d.expand("${T}/log.do_rootfs") | 52 | log_path = self.d.expand("${T}/log.do_rootfs") |
46 | with open(log_path, 'r') as log: | 53 | with open(log_path, 'r') as log: |
47 | for line in log: | 54 | for line in log: |
48 | if 'log_check' in line: | 55 | for ee in excludes: |
56 | m = ee.search(line) | ||
57 | if m: | ||
58 | break | ||
59 | if m: | ||
49 | continue | 60 | continue |
50 | 61 | ||
51 | m = r.search(line) | 62 | m = r.search(line) |
@@ -58,8 +69,8 @@ class Rootfs(object): | |||
58 | # lines beginning with a + since sh -x may emit code which isn't | 69 | # lines beginning with a + since sh -x may emit code which isn't |
59 | # actually executed, but may contain error messages | 70 | # actually executed, but may contain error messages |
60 | excludes = [ 'log_check', r'^\+' ] | 71 | excludes = [ 'log_check', r'^\+' ] |
61 | if hasattr(self, 'log_check_expected_errors_regexes'): | 72 | if hasattr(self, 'log_check_expected_regexes'): |
62 | excludes.extend(self.log_check_expected_errors_regexes) | 73 | excludes.extend(self.log_check_expected_regexes) |
63 | excludes = [re.compile(x) for x in excludes] | 74 | excludes = [re.compile(x) for x in excludes] |
64 | r = re.compile(self.log_check_regex) | 75 | r = re.compile(self.log_check_regex) |
65 | log_path = self.d.expand("${T}/log.do_rootfs") | 76 | log_path = self.d.expand("${T}/log.do_rootfs") |
@@ -597,7 +608,7 @@ class DpkgRootfs(DpkgOpkgRootfs): | |||
597 | def __init__(self, d, manifest_dir): | 608 | def __init__(self, d, manifest_dir): |
598 | super(DpkgRootfs, self).__init__(d) | 609 | super(DpkgRootfs, self).__init__(d) |
599 | self.log_check_regex = '^E:' | 610 | self.log_check_regex = '^E:' |
600 | self.log_check_expected_errors_regexes = \ | 611 | self.log_check_expected_regexes = \ |
601 | [ | 612 | [ |
602 | "^E: Unmet dependencies." | 613 | "^E: Unmet dependencies." |
603 | ] | 614 | ] |