summaryrefslogtreecommitdiffstats
path: root/scripts/oe-build-perf-report
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2018-03-15 14:40:45 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-16 03:42:09 -0700
commitdec7f4f17de99110352cfa8b97583b8193b40ef6 (patch)
treea7bff0051e2c2ecd1c89977b45e887c16affad4d /scripts/oe-build-perf-report
parent0fd6d0dd0041929d60111868ca3575d9d9bf9ac3 (diff)
downloadpoky-dec7f4f17de99110352cfa8b97583b8193b40ef6.tar.gz
scripts/oe-build-perf-report: fix comparing arbitrary commits
Fix a crash when generating a txt report and the two commits to be compared were not consecutive (but there were some tested commits between them). (From OE-Core rev: f3afd2c47f4c740df52dfd80e208ce721d5ebf6e) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-build-perf-report')
-rwxr-xr-xscripts/oe-build-perf-report11
1 files changed, 4 insertions, 7 deletions
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index ac88f0fce5..dc999c45c1 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -639,10 +639,6 @@ def main(argv=None):
639 data.append(AggregateTestData(aggregate_metadata(raw_m), 639 data.append(AggregateTestData(aggregate_metadata(raw_m),
640 aggregate_data(raw_d))) 640 aggregate_data(raw_d)))
641 641
642 # Re-map list indexes to the new table starting from index 0
643 index_r = index_r - index_0
644 index_l = index_l - index_0
645
646 # Read buildstats only when needed 642 # Read buildstats only when needed
647 buildstats = None 643 buildstats = None
648 if args.dump_buildstats or args.html: 644 if args.dump_buildstats or args.html:
@@ -653,10 +649,11 @@ def main(argv=None):
653 649
654 # Print report 650 # Print report
655 if not args.html: 651 if not args.html:
656 print_diff_report(data[index_l].metadata, data[index_l].results, 652 print_diff_report(data[0].metadata, data[0].results,
657 data[index_r].metadata, data[index_r].results) 653 data[1].metadata, data[1].results)
658 else: 654 else:
659 print_html_report(data, index_l, buildstats) 655 # Re-map 'left' list index to the data table where index_0 maps to 0
656 print_html_report(data, index_l - index_0, buildstats)
660 657
661 return 0 658 return 0
662 659