Title: [247710] trunk/Tools
Revision
247710
Author
[email protected]
Date
2019-07-22 17:16:18 -0700 (Mon, 22 Jul 2019)

Log Message

[ews-build] EWS fails to parse multi-line full_results.json
https://bugs.webkit.org/show_bug.cgi?id=199992

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/ews-build/layout_test_failures.py:
(LayoutTestFailures.results_from_string): Concatenate content into single line.
* BuildSlaveSupport/ews-build/steps_unittest.py:
(test_parse_results_json_with_newlines): Unit-test to cover this scenario.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-build/layout_test_failures.py (247709 => 247710)


--- trunk/Tools/BuildSlaveSupport/ews-build/layout_test_failures.py	2019-07-23 00:09:36 UTC (rev 247709)
+++ trunk/Tools/BuildSlaveSupport/ews-build/layout_test_failures.py	2019-07-23 00:16:18 UTC (rev 247710)
@@ -51,6 +51,8 @@
             return None
 
         content_string = cls.strip_json_wrapper(string)
+        # Workaround for https://github.com/buildbot/buildbot/issues/4906
+        content_string = ''.join(content_string.splitlines())
         json_dict = json.loads(content_string)
 
         failing_tests = []

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-07-23 00:09:36 UTC (rev 247709)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-07-23 00:16:18 UTC (rev 247710)
@@ -1037,6 +1037,12 @@
         '''
         self.results_json_mix_flakes_and_regression = '''ADD_RESULTS({"tests":{"http":{"tests":{"IndexedDB":{"collect-IDB-objects.https.html":{"report":"FLAKY","expected":"PASS","actual":"TEXT PASS"}},"xmlhttprequest":{"on-network-timeout-error-during-preflight.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS"}}}},"transitions":{"lengthsize-transition-to-from-auto.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS"}},"imported":{"blink":{"storage":{"indexeddb":{"blob-valid-before-commit.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS","
 ;has_stderr":true}}}}},"fast":{"text":{"font-weight-fallback.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS","has_stderr":true,"reftest_type":["=="]}},"scrolling":{"ios":{"reconcile-layer-position-recursive.html":{"report":"REGRESSION","expected":"PASS","actual":"TEXT"}}}}},"skipped":13174,"num_regressions":1,"other_crashes":{},"interrupted":false,"num_missing":0,"layout_tests_dir":"/Volumes/Data/worker/iOS-12-Simulator-WK2-Tests-EWS/build/LayoutTests","version":4,"num_passes":42158,"pixel_tests_enabled":false,"date":"11:28AM on July 16, 2019","has_pretty_patch":true,"fixable":55329,"num_flaky":5,"uses
 _expectations_file":true});
         '''
+
+        self.results_json_with_newlines = '''ADD_RESULTS({"tests":{"http":{"tests":{"IndexedDB":{"collect-IDB-objects.https.html":{"report":"FLAKY","expected":"PASS","actual":"TEXT PASS"}},"xmlhttprequest":{"on-network-timeout-error-during-preflight.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS"}}}},"transitions":{"lengthsize-trans
+ition-to-from-auto.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS"}},"imported":{"blink":{"storage":{"indexeddb":{"blob-valid-before-commit.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS","has_stderr":true}}}}},"fast":{"text":{"font-weight-fallback.html":{"report":"FLAKY","expected":"PASS","actual":"TIMEOUT PASS","has_stderr":true,"reftest_type":["=="]}},"scrolling":{"ios":{"reconcile-layer-position-recursive.html":{"report":"REGRESSION","expected":"PASS","actual":"TEXT"}}}}},"skipped":13174,"num_regressions":1,"other_crashes":{},
 "interrupted":false,"num_missing":0,"layout_tests_dir":"/Volumes/Data/worker/iOS-12-Simulator-WK2-Tests-EWS/build/LayoutTes
+ts","version":4,"num_passes":42158,"pixel_tests_enabled":false,"date":"11:28AM on July 16, 2019","has_pretty_patch":true,"fixable":55329,"num_flaky":5,"uses_expectations_file":true});
+        '''
+
         return self.setUpBuildStep()
 
     def tearDown(self):
@@ -1142,6 +1148,24 @@
         self.assertEqual(self.getProperty(self.property_failures), ['fast/scrolling/ios/reconcile-layer-position-recursive.html'])
         return rc
 
+    def test_parse_results_json_with_newlines(self):
+        self.configureStep()
+        self.setProperty('fullPlatform', 'ios-simulator')
+        self.setProperty('configuration', 'release')
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        logfiles={'json': self.jsonFileName},
+                        command=['python', 'Tools/Scripts/run-webkit-tests', '--no-build', '--no-new-test-results', '--no-show-results', '--exit-after-n-failures', '30', '--skip-failing-tests', '--release', '--results-directory', 'layout-test-results', '--debug-rwt-logging'],
+                        )
+            + 2
+            + ExpectShell.log('json', stdout=self.results_json_with_newlines),
+        )
+        self.expectOutcome(result=FAILURE, state_string='layout-tests (failure)')
+        rc = self.runStep()
+        self.assertEqual(self.getProperty(self.property_exceed_failure_limit), False)
+        self.assertEqual(self.getProperty(self.property_failures), ['fast/scrolling/ios/reconcile-layer-position-recursive.html'])
+        return rc
+
     def test_unexpected_error(self):
         self.configureStep()
         self.setProperty('fullPlatform', 'mac-highsierra')

Modified: trunk/Tools/ChangeLog (247709 => 247710)


--- trunk/Tools/ChangeLog	2019-07-23 00:09:36 UTC (rev 247709)
+++ trunk/Tools/ChangeLog	2019-07-23 00:16:18 UTC (rev 247710)
@@ -1,3 +1,15 @@
+2019-07-22  Aakash Jain  <[email protected]>
+
+        [ews-build] EWS fails to parse multi-line full_results.json
+        https://bugs.webkit.org/show_bug.cgi?id=199992
+
+        Reviewed by Alexey Proskuryakov.
+
+        * BuildSlaveSupport/ews-build/layout_test_failures.py:
+        (LayoutTestFailures.results_from_string): Concatenate content into single line.
+        * BuildSlaveSupport/ews-build/steps_unittest.py:
+        (test_parse_results_json_with_newlines): Unit-test to cover this scenario.
+
 2019-07-22  Jonathan Bedard  <[email protected]>
 
         resultsdbpy: Handle case where the previous commit doesn't have the changelog
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to