]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/oe-build-perf-report: Allow operation with no buildstats
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 9 Oct 2020 13:43:34 +0000 (14:43 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 19 Oct 2020 14:27:15 +0000 (04:27 -1000)
If buildstats is missing, avoid a backtrace.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 23c4b21f947c7aae1303ca6526fc5aaaa9fc7bb8)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/oe-build-perf-report

index 7ed86a72f667458a018f321f5110b4189118b8fe..b46d61869c0363648e096ed85ebaa3aedd8495b4 100755 (executable)
@@ -353,7 +353,7 @@ def print_html_report(data, id_comp, buildstats):
             bs_key = test + '.' + meas
             rev = str(metadata['commit_num']['value'])
             comp_rev = str(metadata['commit_num']['value_old'])
-            if (rev in buildstats and bs_key in buildstats[rev] and
+            if (buildstats and rev in buildstats and bs_key in buildstats[rev] and
                     comp_rev in buildstats and bs_key in buildstats[comp_rev]):
                 new_meas['buildstats'] = BSSummary(buildstats[comp_rev][bs_key],
                                                    buildstats[rev][bs_key])