Report: Source data
[csit.git] / resources / tools / presentation / generator_tables.py
index 71ec431..4b1da90 100644 (file)
@@ -335,8 +335,8 @@ def _read_csv_template(file_name):
         raise PresentationError(str(err), level="ERROR")
 
 
-def table_performance_comparision(table, input_data):
-    """Generate the table(s) with algorithm: table_performance_comparision
+def table_performance_comparison(table, input_data):
+    """Generate the table(s) with algorithm: table_performance_comparison
     specified in the specification file.
 
     :param table: Table to generate.
@@ -374,14 +374,22 @@ def table_performance_comparision(table, input_data):
                     tbl_dict[tst_name] = {"name": name,
                                           "ref-data": list(),
                                           "cmp-data": list()}
-                tbl_dict[tst_name]["ref-data"].\
-                    append(tst_data["throughput"]["value"])
+                try:
+                    tbl_dict[tst_name]["ref-data"].\
+                        append(tst_data["throughput"]["value"])
+                except TypeError as err:
+                    pass  # No data in output.xml for this test
 
     for job, builds in table["compare"]["data"].items():
         for build in builds:
             for tst_name, tst_data in data[job][str(build)].iteritems():
-                tbl_dict[tst_name]["cmp-data"].\
-                    append(tst_data["throughput"]["value"])
+                try:
+                    tbl_dict[tst_name]["cmp-data"].\
+                        append(tst_data["throughput"]["value"])
+                except KeyError:
+                    pass
+                except TypeError:
+                    tbl_dict.pop(tst_name, None)
 
     tbl_lst = list()
     for tst_name in tbl_dict.keys():