aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-09-15 15:54:51 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-18 11:07:23 +0100
commitcbeb1fb27329f8eba4d779d22fcad56f0fb03947 (patch)
treebf0504cf48d58cc017dc06017487298a8808b3d9
parent25351c7cac167b1a3e8b531e2cdf708192c6fa1f (diff)
downloadopenembedded-core-contrib-cbeb1fb27329f8eba4d779d22fcad56f0fb03947.tar.gz
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. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-xscripts/oe-build-perf-report2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index 3a76ab621d..defd930b04 100755
--- a/scripts/oe-build-perf-report
+++ b/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)