diff options
Diffstat (limited to 'meta/lib/oe/rootfs.py')
-rw-r--r-- | meta/lib/oe/rootfs.py | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index f6fb06cc08..0a2753e6e8 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
@@ -62,6 +62,9 @@ class Rootfs(object): | |||
62 | for line in log: | 62 | for line in log: |
63 | if 'log_check' in line: | 63 | if 'log_check' in line: |
64 | continue | 64 | continue |
65 | # sh -x may emit code which isn't actually executed | ||
66 | if line.startswith('+'): | ||
67 | continue | ||
65 | 68 | ||
66 | if hasattr(self, 'log_check_expected_errors_regexes'): | 69 | if hasattr(self, 'log_check_expected_errors_regexes'): |
67 | m = None | 70 | m = None |
@@ -473,32 +476,6 @@ class RpmRootfs(Rootfs): | |||
473 | # already saved in /etc/rpm-postinsts | 476 | # already saved in /etc/rpm-postinsts |
474 | pass | 477 | pass |
475 | 478 | ||
476 | def _log_check_error(self): | ||
477 | r = re.compile('(unpacking of archive failed|Cannot find package|exit 1|ERR|Fail)') | ||
478 | log_path = self.d.expand("${T}/log.do_rootfs") | ||
479 | with open(log_path, 'r') as log: | ||
480 | found_error = 0 | ||
481 | message = "\n" | ||
482 | for line in log.read().split('\n'): | ||
483 | if 'log_check' in line: | ||
484 | continue | ||
485 | # sh -x may emit code which isn't actually executed | ||
486 | if line.startswith('+'): | ||
487 | continue | ||
488 | |||
489 | m = r.search(line) | ||
490 | if m: | ||
491 | found_error = 1 | ||
492 | bb.warn('log_check: There were error messages in the logfile') | ||
493 | bb.warn('log_check: Matched keyword: [%s]\n\n' % m.group()) | ||
494 | |||
495 | if found_error >= 1 and found_error <= 5: | ||
496 | message += line + '\n' | ||
497 | found_error += 1 | ||
498 | |||
499 | if found_error == 6: | ||
500 | bb.fatal(message) | ||
501 | |||
502 | def _log_check(self): | 479 | def _log_check(self): |
503 | self._log_check_warn() | 480 | self._log_check_warn() |
504 | self._log_check_error() | 481 | self._log_check_error() |