From 30c5d0cb071650a26357ef6e2737f17422ad824d Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Wed, 2 Oct 2019 14:03:57 +0200 Subject: Trending: Report also nr of passed tests in email Change-Id: I7ae188f5f684bd93352255d6b5c491b6d78c822c Signed-off-by: Tibor Frank --- resources/tools/presentation/generator_alerts.py | 24 +- resources/tools/presentation/generator_tables.py | 10 +- .../tools/presentation/specification_CPTA.yaml | 266 ++++++++++++--------- 3 files changed, 172 insertions(+), 128 deletions(-) (limited to 'resources') diff --git a/resources/tools/presentation/generator_alerts.py b/resources/tools/presentation/generator_alerts.py index 1b40dbbbf9..ed4318b3a6 100644 --- a/resources/tools/presentation/generator_alerts.py +++ b/resources/tools/presentation/generator_alerts.py @@ -237,9 +237,9 @@ class Alerting(object): :type alert: dict :type test_set: str :type sort: bool - :returns: CSIT build number, VPP version, Number of failed tests, - Compressed failed tests. - :rtype: tuple(str, str, int, OrderedDict) + :returns: CSIT build number, VPP version, Number of passed tests, + Number of failed tests, Compressed failed tests. + :rtype: tuple(str, str, int, int, OrderedDict) """ directory = self.configs[alert["way"]]["output-dir"] @@ -255,6 +255,12 @@ class Alerting(object): if idx == 1: version = line[:-1] continue + if idx == 2: + passed = line[:-1] + continue + if idx == 3: + failed = line[:-1] + continue try: test = line[:-1].split('-') nic = test[0] @@ -283,9 +289,9 @@ class Alerting(object): keys.sort() for key in keys: sorted_failed_tests[key] = failed_tests[key] - return build, version, idx-1, sorted_failed_tests + return build, version, passed, failed, sorted_failed_tests else: - return build, version, idx-1, failed_tests + return build, version, passed, failed, failed_tests def _generate_email_body(self, alert): """Create the file which is used in the generated alert. @@ -302,7 +308,7 @@ class Alerting(object): text = "" for idx, test_set in enumerate(alert.get("include", [])): - build, version, nr, failed_tests = \ + build, version, passed, failed, failed_tests = \ self._get_compressed_failed_tests(alert, test_set) if build is None: ret_code, build_nr, _ = get_last_completed_build_number( @@ -317,12 +323,14 @@ class Alerting(object): build=build_nr) continue text += ("\n\n{topo}-{arch}, " - "{nr} tests failed, " + "{failed} tests failed, " + "{passed} tests passed, " "CSIT build: {link}/{build}, " "VPP version: {version}\n\n". format(topo=test_set.split('-')[-2], arch=test_set.split('-')[-1], - nr=nr, + failed=failed, + passed=passed, link=alert["urls"][idx], build=build, version=version)) diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index d09f4633bb..2e6cd593e6 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -1327,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)) diff --git a/resources/tools/presentation/specification_CPTA.yaml b/resources/tools/presentation/specification_CPTA.yaml index 1ce7a2fed8..c6fc5fd9fd 100644 --- a/resources/tools/presentation/specification_CPTA.yaml +++ b/resources/tools/presentation/specification_CPTA.yaml @@ -188,20 +188,9 @@ # 3n-hsw plot-performance-trending-all-3n-hsw: csit-vpp-perf-mrr-daily-master: - start: 730 + start: 763 end: "lastCompletedBuild" skip: - - 749 - - 750 - - 751 - - 752 - - 753 - - 754 - - 755 - - 756 - - 757 - - 758 - - 760 - 781 - 782 - 783 @@ -233,8 +222,12 @@ - 831 - 832 - 852 + - 855 + - 856 + - 860 + - 867 csit-dpdk-perf-mrr-weekly-master: - start: 78 + start: 81 end: "lastCompletedBuild" skip: - 87 @@ -243,20 +236,9 @@ plot-performance-trending-vpp-3n-hsw: csit-vpp-perf-mrr-daily-master: - start: 730 + start: 763 end: "lastCompletedBuild" skip: - - 749 - - 750 - - 751 - - 752 - - 753 - - 754 - - 755 - - 756 - - 757 - - 758 - - 760 - 781 - 782 - 783 @@ -288,10 +270,14 @@ - 831 - 832 - 852 + - 855 + - 856 + - 860 + - 867 plot-performance-trending-dpdk-3n-hsw: csit-dpdk-perf-mrr-weekly-master: - start: 78 + start: 81 end: "lastCompletedBuild" skip: - 87 @@ -301,21 +287,9 @@ # 3n-skx plot-performance-trending-all-3n-skx: csit-vpp-perf-mrr-daily-master-3n-skx: - start: 482 + start: 513 end: "lastCompletedBuild" skip: - - 499 - - 500 - - 501 - - 502 - - 503 - - 504 - - 505 - - 506 - - 507 - - 508 - - 510 - - 511 - 531 - 532 - 533 @@ -351,8 +325,12 @@ - 586 - 588 - 600 + - 601 + - 603 + - 604 + - 612 csit-dpdk-perf-mrr-weekly-master-3n-skx: - start: 43 + start: 46 end: "lastCompletedBuild" skip: - 52 @@ -362,21 +340,9 @@ plot-performance-trending-vpp-3n-skx: csit-vpp-perf-mrr-daily-master-3n-skx: - start: 482 + start: 513 end: "lastCompletedBuild" skip: - - 499 - - 500 - - 501 - - 502 - - 503 - - 504 - - 505 - - 506 - - 507 - - 508 - - 510 - - 511 - 531 - 532 - 533 @@ -412,10 +378,14 @@ - 586 - 588 - 600 + - 601 + - 603 + - 604 + - 612 plot-performance-trending-dpdk-3n-skx: csit-dpdk-perf-mrr-weekly-master-3n-skx: - start: 43 + start: 46 end: "lastCompletedBuild" skip: - 52 @@ -426,19 +396,9 @@ # 2n-skx plot-performance-trending-all-2n-skx: csit-vpp-perf-mrr-daily-master-2n-skx: - start: 480 + start: 514 end: "lastCompletedBuild" skip: - - 500 - - 501 - - 502 - - 503 - - 504 - - 505 - - 506 - - 507 - - 508 - - 509 - 532 - 533 - 534 @@ -459,8 +419,13 @@ - 582 - 583 - 605 + - 608 + - 609 + - 612 + - 620 + - 627 csit-dpdk-perf-mrr-weekly-master-2n-skx: - start: 43 + start: 46 end: "lastCompletedBuild" skip: - 52 @@ -470,19 +435,9 @@ plot-performance-trending-vpp-2n-skx: csit-vpp-perf-mrr-daily-master-2n-skx: - start: 480 + start: 514 end: "lastCompletedBuild" skip: - - 500 - - 501 - - 502 - - 503 - - 504 - - 505 - - 506 - - 507 - - 508 - - 509 - 532 - 533 - 534 @@ -503,10 +458,15 @@ - 582 - 583 - 605 + - 608 + - 609 + - 612 + - 620 + - 627 plot-performance-trending-dpdk-2n-skx: csit-dpdk-perf-mrr-weekly-master-2n-skx: - start: 43 + start: 46 end: "lastCompletedBuild" skip: - 52 @@ -516,7 +476,7 @@ plot-performance-trending-vpp-nfv-2n-skx: csit-vpp-perf-mrr-weekly-master-2n-skx: - start: 16 + start: 20 end: "lastCompletedBuild" skip: - 21 @@ -539,6 +499,8 @@ - 72 - 73 - 80 + - 84 + - 89 plot-performance-trending-vpp-3n-tsh: csit-vpp-perf-mrr-daily-master-3n-tsh: @@ -556,6 +518,8 @@ - 72 - 73 - 80 + - 84 + - 89 plot-performance-trending-vpp-3n-dnv: csit-vpp-perf-mrr-daily-master-3n-dnv: @@ -577,6 +541,27 @@ - 68 - 78 - 80 + - 83 + - 84 + - 91 + - 92 + - 93 + - 94 + - 95 + - 96 + - 97 + - 98 + - 99 + - 100 + - 101 + - 102 + - 103 + - 104 + - 105 + - 106 + - 107 + - 108 + - 109 plot-performance-trending-vpp-2n-dnv: csit-vpp-perf-mrr-daily-master-2n-dnv: @@ -593,6 +578,26 @@ - 66 - 79 - 80 + - 83 + - 90 + - 91 + - 92 + - 93 + - 94 + - 95 + - 96 + - 97 + - 98 + - 99 + - 100 + - 101 + - 102 + - 103 + - 104 + - 105 + - 106 + - 107 + - 108 plot-layouts: @@ -689,20 +694,9 @@ # 3n-hsw csit-vpp-perf-mrr-daily-master: - start: 730 + start: 763 end: "lastCompletedBuild" skip: - - 749 - - 750 - - 751 - - 752 - - 753 - - 754 - - 755 - - 756 - - 757 - - 758 - - 760 - 781 - 782 - 783 @@ -734,8 +728,12 @@ - 831 - 832 - 852 + - 855 + - 856 + - 860 + - 867 csit-dpdk-perf-mrr-weekly-master: - start: 78 + start: 81 end: "lastCompletedBuild" skip: - 87 @@ -744,21 +742,9 @@ # 3n-skx csit-vpp-perf-mrr-daily-master-3n-skx: - start: 482 + start: 513 end: "lastCompletedBuild" skip: - - 499 - - 500 - - 501 - - 502 - - 503 - - 504 - - 505 - - 506 - - 507 - - 508 - - 510 - - 511 - 531 - 532 - 533 @@ -794,8 +780,12 @@ - 586 - 588 - 600 + - 601 + - 603 + - 604 + - 612 csit-dpdk-perf-mrr-weekly-master-3n-skx: - start: 43 + start: 46 end: "lastCompletedBuild" skip: - 52 @@ -805,19 +795,9 @@ # 2n-skx csit-vpp-perf-mrr-daily-master-2n-skx: - start: 480 + start: 514 end: "lastCompletedBuild" skip: - - 500 - - 501 - - 502 - - 503 - - 504 - - 505 - - 506 - - 507 - - 508 - - 509 - 532 - 533 - 534 @@ -838,14 +818,19 @@ - 582 - 583 - 605 + - 608 + - 609 + - 612 + - 620 + - 627 csit-vpp-perf-mrr-weekly-master-2n-skx: - start: 16 + start: 20 end: "lastCompletedBuild" skip: - 21 - 29 csit-dpdk-perf-mrr-weekly-master-2n-skx: - start: 43 + start: 46 end: "lastCompletedBuild" skip: - 52 @@ -869,6 +854,8 @@ - 72 - 73 - 80 + - 84 + - 89 # 3n-dnv csit-vpp-perf-mrr-daily-master-3n-dnv: @@ -890,6 +877,27 @@ - 68 - 78 - 80 + - 83 + - 84 + - 91 + - 92 + - 93 + - 94 + - 95 + - 96 + - 97 + - 98 + - 99 + - 100 + - 101 + - 102 + - 103 + - 104 + - 105 + - 106 + - 107 + - 108 + - 109 # 2n-dnv csit-vpp-perf-mrr-daily-master-2n-dnv: @@ -906,6 +914,26 @@ - 66 - 79 - 80 + - 83 + - 90 + - 91 + - 92 + - 93 + - 94 + - 95 + - 96 + - 97 + - 98 + - 99 + - 100 + - 101 + - 102 + - 103 + - 104 + - 105 + - 106 + - 107 + - 108 - type: "output" -- cgit 1.2.3-korg