Bug 1265584 - Output asserts to wptreport.json, r=maja_zf
authorJames Graham <james@hoppipolla.co.uk>
Thu, 10 May 2018 15:43:30 +0100
changeset 419879 b7716dedbf5a24e0e9a940a907225f7b3dd7d35c
parent 419878 605324b9d70e822a9d25e1c6ff7ca2bcbff6085c
child 419880 b021a8615326a99919fe62b493874ac9d49441da
push id34052
push userccoroiu@mozilla.com
push dateFri, 25 May 2018 17:52:14 +0000
treeherdermozilla-central@94d7f0e1c4d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1265584
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1265584 - Output asserts to wptreport.json, r=maja_zf In the future we want to update metadata using the wptreport.json data, since that's much much smaller and easier to parse. In addition, this is required to determine if a test fully passed, so it makes sense to store it here. MozReview-Commit-ID: ErYT33BhqGg
testing/web-platform/tests/tools/wptrunner/wptrunner/formatters.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/formatters.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/formatters.py
@@ -44,22 +44,26 @@ class WptreportFormatter(BaseFormatter):
         }
         test["subtests"].append(subtest)
 
         return subtest
 
     def test_status(self, data):
         subtest = self.create_subtest(data)
         subtest["status"] = data["status"]
+        if "expected" in data:
+            subtest["expected"] = data["expected"]
         if "message" in data:
             subtest["message"] = data["message"]
 
     def test_end(self, data):
         test = self.find_or_create_test(data)
         test["status"] = data["status"]
+        if "expected" in data:
+            test["expected"] = data["expected"]
         if "message" in data:
             test["message"] = data["message"]
 
     def assertion_count(self, data):
         test = self.find_or_create_test(data)
         test["asserts"] = {
             "count": data["count"],
             "min": data["min_expected"],