浏览代码

scripts/oe-build-perf-report: fix handling of --history-length

Don't crash if 'left' revision is older than the range of commits
specified with '--history-length'. In this case the 'left' revision
takes precedence.

(From OE-Core rev: cbeb1fb27329f8eba4d779d22fcad56f0fb03947)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Markus Lehtonen 7 年之前
父节点
当前提交
a7461ad2a2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/oe-build-perf-report

+ 1 - 1
scripts/oe-build-perf-report

@@ -563,7 +563,7 @@ def main(argv=None):
     xml = is_xml_format(repo, revs[index_r].tags[-1])
 
     if args.html:
-        index_0 = max(0, index_r - args.history_length)
+        index_0 = max(0, min(index_l, index_r - args.history_length))
         rev_range = range(index_0, index_r + 1)
     else:
         # We do not need range of commits for text report (no graphs)