Fix run_failure_rate title parameter

This commit fixes the title parameter of run_failure_rate. The title
parameter should work in run_failure_rate however, it didn't work due to
the lack of the code.

Change-Id: Ic6debb8f9a2efb74103c1f5144089050048351f5
This commit is contained in:
Masayuki Igawa 2017-03-31 11:51:46 +09:00
parent eb1aa97ccc
commit 3cce87ac3b
No known key found for this signature in database
GPG Key ID: 251CCDE9053850E4
1 changed files with 5 additions and 1 deletions

View File

@ -64,8 +64,12 @@ def generate_series():
fail_rate = float(fail_num / (pass_num + fail_num) * 100)
if fail_rate > 0.0:
perc_data[key] = fail_rate
if not CONF.title:
title = "Run aggregate failure rate grouped by metadata"
else:
title = CONF.title
plt.figure()
plt.title(title)
plt.barh(range(len(perc_data)), perc_data.values(), align='center')
locs, labels = plt.yticks(range(len(perc_data)), list(perc_data.keys()))
plt.xlabel('Failure Percentage')