[ews-build] Use singular verb in failure description in case of single api test failure
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Apr 2019 18:29:40 +0000 (18:29 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Apr 2019 18:29:40 +0000 (18:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197013

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeAPITestsResults.analyzeResults):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244504 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/steps.py
Tools/ChangeLog

index 2fb797b..419e9db 100644 (file)
@@ -807,7 +807,8 @@ class AnalyzeAPITestsResults(buildstep.BuildStep):
             self._addToLog('stderr', '\nNew failures: {}\n'.format(new_failures))
             self.finished(FAILURE)
             self.build.results = FAILURE
-            message = 'Found {} new API Tests failures: {}'.format(len(new_failures), new_failures_string)
+            pluralSuffix = 's' if len(new_failures) > 1 else ''
+            message = 'Found {} new API Test failure{}: {}'.format(len(new_failures), pluralSuffix, new_failures_string)
             self.descriptionDone = message
             self.build.buildFinished([message], FAILURE)
         else:
@@ -815,7 +816,8 @@ class AnalyzeAPITestsResults(buildstep.BuildStep):
             self.finished(SUCCESS)
             self.build.results = SUCCESS
             self.descriptionDone = 'Passed API tests'
-            message = 'Found {} pre-existing API tests failures'.format(len(clean_tree_failures))
+            pluralSuffix = 's' if len(clean_tree_failures) > 1 else ''
+            message = 'Found {} pre-existing API test failure{}'.format(len(clean_tree_failures), pluralSuffix)
             if flaky_failures:
                 message += '. Flaky tests: {}'.format(flaky_failures_string)
             self.build.buildFinished([message], SUCCESS)
index dd3f7a2..7507779 100644 (file)
@@ -1,3 +1,13 @@
+2019-04-22  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews-build] Use singular verb in failure description in case of single api test failure
+        https://bugs.webkit.org/show_bug.cgi?id=197013
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (AnalyzeAPITestsResults.analyzeResults):
+
 2019-04-22  Chris Dumez  <cdumez@apple.com>
 
         Delayed WebProcessLaunch may break the _relatedWebView SPI