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
Useful scripts for interacting with WPT logs #24841
Merged
+209
−0
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4c82161
Add script to summarize WPT test directories with failing tests.
jdm a634d90
Add a script to extra logs for particular test filenames from full WP…
jdm ed715fc
Add a script to report timing data for all tests in a WPT log.
jdm 5867e11
Fix tidy issues in wpt-timing.py.
jdm 46af28a
Fix tidy issues in wpt-summarize.py.
jdm 6cad3db
Remove unused import.
jdm cc1aadf
Add explanatory comment for wpt-summarize.py.
jdm 0c294de
Add explanatory comment to wpt-timing.py.
jdm 804780f
Add explanatory comment for wpt_result_analyzer.py.
jdm 41d1eca
Fix visual indent error.
jdm File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
Loading status checks…
Add a script to extra logs for particular test filenames from full WP…
…T logs.
- Loading branch information
jdm
committed
Nov 22, 2019
commit a634d90e4ac80027466782975007de33afcb4c28
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
| @@ -0,0 +1,37 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| # Copyright 2019 The Servo Project Developers. See the COPYRIGHT | ||
| # file at the top-level directory of this distribution. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
| # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
| # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
| # option. This file may not be copied, modified, or distributed | ||
| # except according to those terms. | ||
|
|
||
| import sys | ||
| import json | ||
|
|
||
| full_search = len(sys.argv) > 3 and sys.argv[3] == '--full' | ||
|
|
||
| with open(sys.argv[1]) as f: | ||
| data = f.readlines() | ||
| thread = None | ||
| for entry in data: | ||
| entry = json.loads(entry) | ||
| if thread and "thread" in entry: | ||
| if entry["thread"] == thread: | ||
| print(json.dumps(entry)) | ||
|
This conversation was marked as resolved
by jdm
jdm
Author
Member
|
||
| if "action" in entry and entry["action"] == "test_end": | ||
| thread = None | ||
| else: | ||
| if "action" in entry and \ | ||
| entry["action"] == "test_start" and \ | ||
| entry["test"] == sys.argv[2]: | ||
| thread = entry["thread"] | ||
| print(json.dumps(entry)) | ||
| elif full_search and \ | ||
| "command" in entry and \ | ||
| sys.argv[2] in entry["command"]: | ||
| thread = entry["thread"] | ||
| print(json.dumps(entry)) | ||
ProTip!
Use n and p to navigate between commits in a pull request.
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.
won't this skip test_starts from other threads?