Trending: Report also nr of passed tests in email
[csit.git] / resources / tools / presentation / generator_tables.py
index d87caa0..2e6cd59 100644 (file)
@@ -136,13 +136,14 @@ def table_merged_details(table, input_data):
     # Transform the data
     logging.info("    Creating the data set for the {0} '{1}'.".
                  format(table.get("type", ""), table.get("title", "")))
-    data = input_data.filter_data(table)
+    data = input_data.filter_data(table, continue_on_error=True)
     data = input_data.merge_data(data)
     data.sort_index(inplace=True)
 
     logging.info("    Creating the data set for the {0} '{1}'.".
                  format(table.get("type", ""), table.get("title", "")))
-    suites = input_data.filter_data(table, data_set="suites")
+    suites = input_data.filter_data(
+        table, continue_on_error=True, data_set="suites")
     suites = input_data.merge_data(suites)
 
     # Prepare the header of the tables
@@ -1326,14 +1327,22 @@ def table_last_failed_tests(table, input_data):
                 return
             tbl_list.append(build)
             tbl_list.append(version)
+            failed_tests = list()
+            passed = 0
+            failed = 0
             for tst_name, tst_data in data[job][build].iteritems():
                 if tst_data["status"] != "FAIL":
+                    passed += 1
                     continue
+                failed += 1
                 groups = re.search(REGEX_NIC, tst_data["parent"])
                 if not groups:
                     continue
                 nic = groups.group(0)
-                tbl_list.append("{0}-{1}".format(nic, tst_data["name"]))
+                failed_tests.append("{0}-{1}".format(nic, tst_data["name"]))
+            tbl_list.append(str(passed))
+            tbl_list.append(str(failed))
+            tbl_list.extend(failed_tests)
 
     file_name = "{0}{1}".format(table["output-file"], table["output-file-ext"])
     logging.info("    Writing file: '{0}'".format(file_name))