Bug 1893537 - Add reftest modifiers to errorsummary upon failure. r=gbrown

Differential Revision: https://phabricator.services.mozilla.com/D209156
This commit is contained in:
Joel Maher 2024-05-01 19:25:43 +00:00
Родитель 05c2ccf272
Коммит 7a2adbd2e1
4 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -155,6 +155,7 @@ function ReadManifest(aURL, aFilter, aManifestID) {
var origLength = items.length;
items = defaults.concat(items);
var modifiers = [...items];
while (
items[0].match(
/^(fails|needs-focus|random|skip|asserts|slow|require-or|silentfail|pref|test-pref|ref-pref|fuzzy|chaos-mode|wr-capture|wr-capture-ref|noautofuzz)/
@ -492,6 +493,7 @@ function ReadManifest(aURL, aFilter, aManifestID) {
chaosMode,
wrCapture,
noAutoFuzz,
modifiers,
},
aFilter,
aManifestID
@ -572,6 +574,7 @@ function ReadManifest(aURL, aFilter, aManifestID) {
chaosMode,
wrCapture,
noAutoFuzz,
modifiers,
},
aFilter,
aManifestID

Просмотреть файл

@ -1512,6 +1512,8 @@ function RecordResult(testRunTime, errorMsg, typeSpecificResults) {
extra.image1 = image1;
}
}
extra.modifiers = g.urls[0].modifiers;
logger.testStatus(
g.urls[0].identifier,
message,

Просмотреть файл

@ -46,6 +46,7 @@ class ErrorSummaryFormatter(BaseFormatter):
"expected": item["expected"],
"message": item.get("message"),
"stack": item.get("stack"),
"modifiers": item.get("extra", {}).get("modifiers", ""),
"known_intermittent": item.get("known_intermittent", []),
}
return self._output("test_result", data)

Просмотреть файл

@ -33,7 +33,7 @@ import pytest
],
"""
{"groups": ["manifestA", "manifestB"], "action": "test_groups", "line": 0}
{"test": "test_baz", "subtest": null, "group": "manifestA", "status": "PASS", "expected": "FAIL", "message": null, "stack": null, "known_intermittent": [], "action": "test_result", "line": 8}
{"test": "test_baz", "subtest": null, "group": "manifestA", "status": "PASS", "expected": "FAIL", "message": null, "stack": null, "modifiers": "", "known_intermittent": [], "action": "test_result", "line": 8}
{"group": "manifestA", "status": "ERROR", "duration": 20, "action": "group_result", "line": 9}
{"group": "manifestB", "status": "OK", "duration": 10, "action": "group_result", "line": 9}
""".strip(),
@ -86,7 +86,7 @@ import pytest
],
"""
{"groups": ["manifestA", "manifestB"], "action": "test_groups", "line": 0}
{"test": "test_bar", "subtest": null, "group": "manifestA", "status": "CRASH", "expected": "OK", "message": null, "stack": null, "known_intermittent": [], "action": "test_result", "line": 4}
{"test": "test_bar", "subtest": null, "group": "manifestA", "status": "CRASH", "expected": "OK", "message": null, "stack": null, "modifiers": "", "known_intermittent": [], "action": "test_result", "line": 4}
{"group": "manifestA", "status": "ERROR", "duration": 20, "action": "group_result", "line": 9}
{"group": "manifestB", "status": "OK", "duration": 10, "action": "group_result", "line": 9}
""".strip(),
@ -143,8 +143,8 @@ import pytest
],
"""
{"groups": ["manifestA", "manifestB"], "action": "test_groups", "line": 0}
{"test": "test_baz", "subtest": "Test timed out", "group": "manifestA", "status": "FAIL", "expected": "PASS", "message": null, "stack": null, "known_intermittent": [], "action": "test_result", "line": 8}
{"test": "test_baz", "subtest": "", "group": "manifestA", "status": "TIMEOUT", "expected": "PASS", "message": null, "stack": null, "known_intermittent": [], "action": "test_result", "line": 9}
{"test": "test_baz", "subtest": "Test timed out", "group": "manifestA", "status": "FAIL", "expected": "PASS", "message": null, "stack": null, "modifiers": "", "known_intermittent": [], "action": "test_result", "line": 8}
{"test": "test_baz", "subtest": "", "group": "manifestA", "status": "TIMEOUT", "expected": "PASS", "message": null, "stack": null, "modifiers": "", "known_intermittent": [], "action": "test_result", "line": 9}
{"test": "manifestA", "group": "manifestA", "signature": "signature", "stackwalk_stderr": null, "stackwalk_stdout": null, "action": "crash", "line": 10}
{"group": "manifestA", "status": "ERROR", "duration": 49, "action": "group_result", "line": 12}
{"group": "manifestB", "status": "OK", "duration": 10, "action": "group_result", "line": 12}
@ -225,7 +225,7 @@ import pytest
],
"""
{"groups": ["manifestA", "manifestB"], "action": "test_groups", "line": 0}
{"test": "test_baz", "group": "manifestA", "status": "FAIL", "expected": "OK", "subtest": null, "message": null, "stack": null, "known_intermittent": [], "action": "test_result", "line": 8}
{"test": "test_baz", "group": "manifestA", "status": "FAIL", "expected": "OK", "subtest": null, "message": null, "stack": null, "modifiers": "", "known_intermittent": [], "action": "test_result", "line": 8}
""".strip(),
id="timeout_no_group_status",
),