X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_CPTA.py;h=a4459bc003957910231a68615f3375f5a7c89ed6;hb=0b752a7820087d5fec452d00c3bc42b8f1298501;hp=f96fab0f8863df09eed349fb5ca753ebffcf5e7e;hpb=4b0df8e7baea755e2e1a1c27a7707fb0a3f28b6e;p=csit.git diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py index f96fab0f88..a4459bc003 100644 --- a/resources/tools/presentation/generator_CPTA.py +++ b/resources/tools/presentation/generator_CPTA.py @@ -312,20 +312,27 @@ def _generate_all_charts(spec, input_data): csv_tbl.append("{0},".format(tst_name) + ",".join(tst_lst) + '\n') # Generate traces: traces = list() - win_size = 14 index = 0 for test_name, test_data in chart_data.items(): if not test_data: logs.append(("WARNING", "No data for the test '{0}'". format(test_name))) continue + message = "index: {index}, test: {test}".format( + index=index, test=test_name) test_name = test_name.split('.')[-1] - trace, rslt = _generate_trending_traces( - test_data, - job_name=job_name, - build_info=build_info, - name='-'.join(test_name.split('-')[3:-1]), - color=COLORS[index]) + try: + trace, rslt = _generate_trending_traces( + test_data, + job_name=job_name, + build_info=build_info, + name='-'.join(test_name.split('-')[2:-1]), + color=COLORS[index]) + except IndexError: + message = "Out of colors: {}".format(message) + logs.append(("ERROR", message)) + logging.error(message) + continue traces.extend(trace) res.append(rslt) index += 1