From 28df2308db6d12154f390c9dadaaa3a0ec7d409e Mon Sep 17 00:00:00 2001 From: Zhe Sun <31067185+ZheSun88@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:22:00 +0300 Subject: [PATCH] update the failed build checking (#12439) (#12440) --- scripts/GenerateBuildTestAndStagingReport.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/GenerateBuildTestAndStagingReport.py b/scripts/GenerateBuildTestAndStagingReport.py index fb8874543e..791c346f46 100644 --- a/scripts/GenerateBuildTestAndStagingReport.py +++ b/scripts/GenerateBuildTestAndStagingReport.py @@ -47,7 +47,9 @@ def getTestStatusHtml(): return createTableRow(traffic_light.format(color="black"), "Test status: unable to retrieve status of tests") else: test_failures_json = test_failures_request.json() - if test_failures_json["count"] == 0: + # nowadays the responds doesn't contain count keyword when the build is successful + # while count word can be found when build fails + if "count" not in test_failures_json: return createTableRow(traffic_light.format(color="green"), "Test status: all tests passing") else: return createTableRow(traffic_light.format(color="red"), "Test status: there are " + str(test_failures_json["count"]) + " failing tests, check the build report".format(buildResultUrl)) -- 2.39.5