diff options
author | Colin Walters <walters@verbum.org> | 2011-03-24 18:55:00 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2011-03-26 10:18:26 -0400 |
commit | 21967250e7d14431155fa218d539bcd5e5809cb0 (patch) | |
tree | a84ea3fde336330cf3e6d262f2398ff981648721 /bin/metabuild | |
parent | 03d831e9bcb0011b3402da46f06f2ab3b2f59542 (diff) | |
download | homegit-MOVED-TO-GNOME-21967250e7d14431155fa218d539bcd5e5809cb0.tar.gz homegit-MOVED-TO-GNOME-21967250e7d14431155fa218d539bcd5e5809cb0.tar.xz homegit-MOVED-TO-GNOME-21967250e7d14431155fa218d539bcd5e5809cb0.zip |
metabuild: Write last 100 lines of log file on failing build
Prefix with | like bitbake does.
Diffstat (limited to 'bin/metabuild')
-rwxr-xr-x | bin/metabuild | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/metabuild b/bin/metabuild index 455d403..aeb0944 100755 --- a/bin/metabuild +++ b/bin/metabuild @@ -104,22 +104,23 @@ class OutputFilter(object): return False def _write_last_log_lines(self): + _last_line_limit = 100 f = open(logfile_path) lines = [] for line in f: if line.startswith('metabuild: '): continue lines.append(line) - if len(lines) > 10: + if len(lines) > _last_line_limit: lines.pop(0) f.close() for line in lines: + self.output.write('| ') self.output.write(line) def _final_output(self, successful): if not successful: - # disabled temporarily - #self._write_last_log_lines() + self._write_last_log_lines() pass self.output.write("metabuild: %s %s: %d warnings\n" % (target_phase, 'success' if successful else 'failed', |