Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
15931a1d
Commit
15931a1d
authored
10 years ago
by
Joshua Litt
Browse files
Options
Downloads
Patches
Plain Diff
Small fixes to script based off of cry-infra
Change-Id: I5a65d6fdb27516aefda0473ac45b05186cf0913c
parent
bda5352b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/android/scrape_gtest_log.py
+30
-1
30 additions, 1 deletion
test/android/scrape_gtest_log.py
with
30 additions
and
1 deletion
test/android/scrape_gtest_log.py
+
30
−
1
View file @
15931a1d
...
...
@@ -13,16 +13,45 @@ waterfall to gather json results mixed in with gtest logs. This is
dubious software engineering.
"""
import
getopt
import
json
import
os
import
re
import
sys
def
main
():
if
len
(
sys
.
argv
)
!=
3
:
print
"
Expects a file to write json to!
"
exit
(
1
)
try
:
opts
,
_
=
\
getopt
.
getopt
(
sys
.
argv
[
1
:],
\
'
o:
'
,
[
'
output-json=
'
])
except
getopt
.
GetOptError
:
print
'
scrape_gtest_log.py -o <output_json>
'
sys
.
exit
(
2
)
output_json
=
''
for
opt
,
arg
in
opts
:
if
opt
in
(
'
-o
'
,
'
--output-json
'
):
output_json
=
os
.
path
.
join
(
arg
)
blob
=
sys
.
stdin
.
read
()
json_string
=
'
[
'
+
'
,
'
.
join
(
'
{
'
+
x
+
'
}
'
for
x
in
re
.
findall
(
r
'
{([^}]*.?)}
'
,
blob
))
+
'
]
'
print
json
.
dumps
(
json
.
loads
(
json_string
),
indent
=
4
,
sort_keys
=
True
)
print
blob
output
=
json
.
dumps
(
json
.
loads
(
json_string
),
indent
=
4
,
sort_keys
=
True
)
print
output
path
=
os
.
path
.
dirname
(
output_json
)
if
path
and
not
os
.
path
.
exists
(
path
):
os
.
makedirs
(
path
)
outfile
=
open
(
output_json
,
'
w
'
)
outfile
.
write
(
output
)
if
__name__
==
'
__main__
'
:
sys
.
exit
(
main
())
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment