diff options
Diffstat (limited to 'meta/lib/oe/rootfs.py')
| -rw-r--r-- | meta/lib/oe/rootfs.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index a92aa22103..63ca22f311 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
| @@ -54,26 +54,25 @@ class Rootfs(object): | |||
| 54 | % (self.d.getVar('PN', True), m.group(), line)) | 54 | % (self.d.getVar('PN', True), m.group(), line)) |
| 55 | 55 | ||
| 56 | def _log_check_error(self): | 56 | def _log_check_error(self): |
| 57 | # Ignore any lines containing log_check to avoid recursion, and ignore | ||
| 58 | # lines beginning with a + since sh -x may emit code which isn't | ||
| 59 | # actually executed, but may contain error messages | ||
| 60 | excludes = [ 'log_check', r'^\+' ] | ||
| 61 | if hasattr(self, 'log_check_expected_errors_regexes'): | ||
| 62 | excludes.extend(self.log_check_expected_errors_regexes) | ||
| 63 | excludes = [re.compile(x) for x in excludes] | ||
| 57 | r = re.compile(self.log_check_regex) | 64 | r = re.compile(self.log_check_regex) |
| 58 | log_path = self.d.expand("${T}/log.do_rootfs") | 65 | log_path = self.d.expand("${T}/log.do_rootfs") |
| 59 | with open(log_path, 'r') as log: | 66 | with open(log_path, 'r') as log: |
| 60 | found_error = 0 | 67 | found_error = 0 |
| 61 | message = "\n" | 68 | message = "\n" |
| 62 | for line in log: | 69 | for line in log: |
| 63 | if 'log_check' in line: | 70 | for ee in excludes: |
| 64 | continue | 71 | m = ee.search(line) |
| 65 | # sh -x may emit code which isn't actually executed | ||
| 66 | if line.startswith('+'): | ||
| 67 | continue | ||
| 68 | |||
| 69 | if hasattr(self, 'log_check_expected_errors_regexes'): | ||
| 70 | m = None | ||
| 71 | for ee in self.log_check_expected_errors_regexes: | ||
| 72 | m = re.search(ee, line) | ||
| 73 | if m: | ||
| 74 | break | ||
| 75 | if m: | 72 | if m: |
| 76 | continue | 73 | break |
| 74 | if m: | ||
| 75 | continue | ||
| 77 | 76 | ||
| 78 | m = r.search(line) | 77 | m = r.search(line) |
| 79 | if m: | 78 | if m: |
