-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a schema for wptreport.json #29259
Open
gsnedders
wants to merge
1
commit into
web-platform-tests:master
Choose a base branch
from
gsnedders:wptreport-schema
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,312 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "WptReport", | ||
"type": "object", | ||
"required": [ | ||
"results", | ||
"run_info", | ||
"time_end", | ||
"time_start" | ||
], | ||
"properties": { | ||
"lsan_leaks": { | ||
"type": [ | ||
"array", | ||
"null" | ||
], | ||
"items": { | ||
"$ref": "#/definitions/LsanLeak" | ||
} | ||
}, | ||
"mozleak": { | ||
"type": [ | ||
"object", | ||
"null" | ||
], | ||
"additionalProperties": { | ||
"$ref": "#/definitions/MozLeak" | ||
} | ||
}, | ||
"results": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/TestResult" | ||
} | ||
}, | ||
"run_info": true, | ||
"time_end": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
}, | ||
"time_start": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
} | ||
}, | ||
"definitions": { | ||
"AssertionCount": { | ||
"type": "object", | ||
"required": [ | ||
"count", | ||
"max", | ||
"min" | ||
], | ||
"properties": { | ||
"count": { | ||
"type": "integer", | ||
"format": "uint32", | ||
"minimum": 0.0 | ||
}, | ||
"max": { | ||
"type": "integer", | ||
"format": "uint32", | ||
"minimum": 0.0 | ||
}, | ||
"min": { | ||
"type": "integer", | ||
"format": "uint32", | ||
"minimum": 0.0 | ||
} | ||
} | ||
}, | ||
"LsanLeak": { | ||
"type": "object", | ||
"required": [ | ||
"frames", | ||
"scope" | ||
], | ||
"properties": { | ||
"allowed_match": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"frames": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"scope": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"MozLeak": { | ||
"type": "object", | ||
"required": [ | ||
"objects", | ||
"total" | ||
], | ||
"properties": { | ||
"objects": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/MozLeakObject" | ||
} | ||
}, | ||
"total": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/MozLeakTotal" | ||
} | ||
} | ||
} | ||
}, | ||
"MozLeakObject": { | ||
"type": "object", | ||
"required": [ | ||
"allowed", | ||
"bytes", | ||
"name" | ||
], | ||
"properties": { | ||
"allowed": { | ||
"type": "boolean" | ||
}, | ||
"bytes": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"process": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
} | ||
} | ||
}, | ||
"MozLeakTotal": { | ||
"type": "object", | ||
"required": [ | ||
"bytes", | ||
"threshold" | ||
], | ||
"properties": { | ||
"bytes": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
}, | ||
"process": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"threshold": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
} | ||
} | ||
}, | ||
"SubtestResult": { | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"status" | ||
], | ||
"properties": { | ||
"expected": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/SubtestStatus" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"known_intermittent": { | ||
"type": [ | ||
"array", | ||
"null" | ||
], | ||
"items": { | ||
"$ref": "#/definitions/SubtestStatus" | ||
} | ||
}, | ||
"message": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"status": { | ||
"$ref": "#/definitions/SubtestStatus" | ||
} | ||
} | ||
}, | ||
"SubtestStatus": { | ||
"type": "string", | ||
"enum": [ | ||
"PASS", | ||
"FAIL", | ||
"ERROR", | ||
"TIMEOUT", | ||
"ASSERT", | ||
"NOTRUN", | ||
"SKIP", | ||
"PRECONDITION_FAILED" | ||
] | ||
}, | ||
"TestResult": { | ||
"type": "object", | ||
"required": [ | ||
"status", | ||
"subtests", | ||
"test" | ||
], | ||
"properties": { | ||
"asserts": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/AssertionCount" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"duration": { | ||
"type": [ | ||
"integer", | ||
"null" | ||
], | ||
"format": "int64" | ||
}, | ||
"expected": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/TestStatus" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"known_intermittent": { | ||
"type": [ | ||
"array", | ||
"null" | ||
], | ||
"items": { | ||
"$ref": "#/definitions/TestStatus" | ||
} | ||
}, | ||
"message": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"reftest_screenshots": { | ||
"type": [ | ||
"object", | ||
"null" | ||
], | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"status": { | ||
"$ref": "#/definitions/TestStatus" | ||
}, | ||
"subtests": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/SubtestResult" | ||
} | ||
}, | ||
"test": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"TestStatus": { | ||
"type": "string", | ||
"enum": [ | ||
"PASS", | ||
"FAIL", | ||
"OK", | ||
"ERROR", | ||
"TIMEOUT", | ||
"CRASH", | ||
"ASSERT", | ||
"SKIP", | ||
"PRECONDITION_FAILED" | ||
] | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgraham do we want to give some guarantees as to what appears in
run_info
?Per
wpt/tools/wptrunner/wptrunner/wpttest.py
Line 83 in 7f6dc72
python_version
,product
,verify
,headless
, andwebrender
(!!!!).That said, looking through those I guess none of them are actually that useful in general… (product is, but it's of limited use without product version and OS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think we do. It's kind of annoying, but I think we want to allow people to pass back empty
run_info
if they aren't comparing to other products/configurations. In practice specific expectation metadata does depend on specific properties exising, but the metadata isn't really terribly portable beyond the system it runs in, so that isn't obviously a sufficient justification for standardising this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not even just making it a nullable object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the guarantee for RunInfo is that it's a
Map<String, JsonValue>
(in some Rustish syntax). I don't think it should be null but I don't think we can guarantee any specific fields.