Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit e5c5b3e

Browse files
jgrahammoz-wptsync-bot
authored andcommitted
Allow handling multiple reruns in wptreport.json files
Previously when running with --rerun=N we added all the subtest results to the previous test results and so got all N iterations of each subtest result, but only one of each test result. Instead ensure that top-level tests are added each time they are run, allowing multiple test results. Differential Revision: https://phabricator.services.mozilla.com/D47249 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1584192 gecko-commit: 325b5278961fb32b8fd6d4dcc481c4dd7890f33c gecko-integration-branch: autoland gecko-reviewers: maja_zf
1 parent 6a6f8f2 commit e5c5b3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/wptrunner/wptrunner/formatters/wptreport.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def suite_start(self, data):
6262
if 'run_info' in data:
6363
self.results['run_info'] = data['run_info']
6464
self.results['time_start'] = data['time']
65+
self.results["results"] = []
6566

6667
def suite_end(self, data):
6768
self.results['time_end'] = data['time']
68-
self.results["results"] = []
6969
for test_name in self.raw_results:
7070
result = {"test": test_name}
7171
result.update(self.raw_results[test_name])
@@ -126,6 +126,11 @@ def test_end(self, data):
126126
for item in data["extra"]["reftest_screenshots"]
127127
if type(item) == dict
128128
}
129+
test_name = data["test"]
130+
result = {"test": data["test"]}
131+
result.update(self.raw_results[test_name])
132+
self.results["results"].append(result)
133+
self.raw_results.pop(test_name)
129134

130135
def assertion_count(self, data):
131136
test = self.find_or_create_test(data)

0 commit comments

Comments
 (0)