Skip to content

Commit

Permalink
Support errorsummary files in update-wpt
Browse files Browse the repository at this point in the history
These are shorter and easier to deal with. We filter intermittents
through these, so it's convenient if WPT can directly accept these
files.

`
  • Loading branch information
Manishearth authored and Servo WPT Sync committed Nov 20, 2018
1 parent c1faeb4 commit d43d3b5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tools/wptrunner/wptrunner/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def __init__(self, id_test_map, ignore_existing=False):
self.action_map = {"suite_start": self.suite_start,
"test_start": self.test_start,
"test_status": self.test_status,
"test_result": self.test_result,
"test_end": self.test_end,
"assertion_count": self.assertion_count,
"lsan_leak": self.lsan_leak}
Expand Down Expand Up @@ -371,6 +372,34 @@ def test_status(self, data):
if data.get("expected") and data["expected"] != data["status"]:
test_data.set_requires_update()

# This only gets called for WPT errorsummary style logs
def test_result(self, data):
if data["status"] == "SKIP":
return

test_id = intern(data["test"].encode("utf8"))
try:
subtest = intern(data["subtest"].encode("utf8"))
except AttributeError:
# This happens for whole-test results, e.g. crashes
subtest = None
test_data = self.id_test_map.get(test_id)
try:
test_data = self.id_test_map[test_id]
except KeyError:
print "Test not found %s, skipping" % test_id
return

result = status_intern.store(data["status"])

if not self.run_info:
self.run_info = run_info_intern.store({})

test_data.set(test_id, subtest, "status", self.run_info, result)
print subtest, result
if data.get("expected") and data["expected"] != data["status"]:
test_data.set_requires_update()

def test_end(self, data):
if data["status"] == "SKIP":
return
Expand Down

0 comments on commit d43d3b5

Please sign in to comment.