Title: [235789] trunk/Tools
Revision
235789
Author
aakash_j...@apple.com
Date
2018-09-07 11:49:23 -0700 (Fri, 07 Sep 2018)

Log Message

[ews-build] API tests should output result summary in json
https://bugs.webkit.org/show_bug.cgi?id=189417

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(RunAPITests): Passed --json-output parameter to run-api-tests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (235788 => 235789)


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2018-09-07 18:15:48 UTC (rev 235788)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2018-09-07 18:49:23 UTC (rev 235789)
@@ -479,7 +479,10 @@
     name = 'run-api-tests'
     description = ['api tests running']
     descriptionDone = ['api-tests']
-    command = ['python', 'Tools/Scripts/run-api-tests', '--no-build', WithProperties('--%(configuration)s'), '--verbose']
+    jsonFileName = 'api_test_results.json'
+    logfiles = {'json': jsonFileName}
+    command = ['python', 'Tools/Scripts/run-api-tests', '--no-build',
+               WithProperties('--%(configuration)s'), '--verbose', '--json-output={0}'.format(jsonFileName)]
     failedTestsFormatString = '%d api test%s failed or timed out'
 
     def start(self):

Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (235788 => 235789)


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2018-09-07 18:15:48 UTC (rev 235788)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2018-09-07 18:49:23 UTC (rev 235789)
@@ -928,6 +928,7 @@
 class TestRunAPITests(BuildStepMixinAdditions, unittest.TestCase):
     def setUp(self):
         self.longMessage = True
+        self.jsonFileName = 'api_test_results.json'
         return self.setUpBuildStep()
 
     def tearDown(self):
@@ -941,7 +942,8 @@
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
-                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--release', '--verbose'],
+                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--release', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+                        logfiles={'json': self.jsonFileName},
                         )
             + ExpectShell.log('stdio', stdout='''...
 worker/0 TestWTF.WTF_Variant.OperatorAmpersand Passed
@@ -967,7 +969,8 @@
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
-                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--ios-simulator'],
+                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName), '--ios-simulator'],
+                        logfiles={'json': self.jsonFileName},
                         )
             + ExpectShell.log('stdio', stdout='''...
 worker/0 TestWTF.WTF_Variant.OperatorAmpersand Passed
@@ -993,7 +996,8 @@
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
-                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose'],
+                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+                        logfiles={'json': self.jsonFileName},
                         )
             + ExpectShell.log('stdio', stdout='''
 worker/0 TestWTF.WTF_Variant.OperatorAmpersand Passed
@@ -1033,7 +1037,8 @@
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
-                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose'],
+                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+                        logfiles={'json': self.jsonFileName},
                         )
             + ExpectShell.log('stdio', stdout='''...
 worker/0 TestWTF.WTF_Variant.OperatorAmpersand Passed
@@ -1087,7 +1092,8 @@
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
-                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose'],
+                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+                        logfiles={'json': self.jsonFileName},
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure. Failed to run api tests.')
             + 2,
@@ -1103,7 +1109,8 @@
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
-                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose'],
+                        command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+                        logfiles={'json': self.jsonFileName},
                         )
             + ExpectShell.log('stdio', stdout='''...
 worker/0 TestWTF.WTF_Variant.OperatorAmpersand Passed

Modified: trunk/Tools/ChangeLog (235788 => 235789)


--- trunk/Tools/ChangeLog	2018-09-07 18:15:48 UTC (rev 235788)
+++ trunk/Tools/ChangeLog	2018-09-07 18:49:23 UTC (rev 235789)
@@ -1,3 +1,14 @@
+2018-09-07  Aakash Jain  <aakash_j...@apple.com>
+
+        [ews-build] API tests should output result summary in json
+        https://bugs.webkit.org/show_bug.cgi?id=189417
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (RunAPITests): Passed --json-output parameter to run-api-tests.
+        * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
+
 2018-09-07  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r235784.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to