Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kazoo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
kazoo
Commits
24b3fb3b
Commit
24b3fb3b
authored
Aug 30, 2019
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test script
save test report in a file, to avoid polluting the screen
parent
57fd20fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
test/test.py
test/test.py
+15
-10
No files found.
test/test.py
View file @
24b3fb3b
...
@@ -49,22 +49,27 @@ def make(rule, path):
...
@@ -49,22 +49,27 @@ def make(rule, path):
def
summarize
(
results
,
elapsed
):
def
summarize
(
results
,
elapsed
):
''' At the end display the errors of project that failed '''
''' At the end display the errors of project that failed '''
failed
=
0
failed
=
0
with
open
(
"/tmp/kazoo.err"
,
"w"
)
as
f
:
f
.
write
(
"kazoo test report"
)
f
.
write
(
"-----------------"
)
for
errcode
,
stdout
,
stderr
,
path
,
rule
in
results
:
for
errcode
,
stdout
,
stderr
,
path
,
rule
in
results
:
if
errcode
==
0
:
if
errcode
==
0
:
continue
continue
failed
+=
1
failed
+=
1
print
(
"="
*
80
)
with
open
(
"/tmp/kazoo.err"
,
'a'
)
as
f
:
print
(
"ERROR: %s %s"
%
(
path
,
rule
))
f
.
write
(
"="
*
80
)
if
stdout
:
f
.
write
(
"ERROR: %s %s"
%
(
path
,
rule
))
print
(
"-- stdout "
+
"-"
*
70
)
if
stdout
:
print
(
stdout
.
decode
())
f
.
write
(
"-- stdout "
+
"-"
*
70
)
if
stderr
:
f
.
write
(
stdout
.
decode
())
print
(
"-- stderr "
+
"-"
*
70
)
if
stderr
:
print
(
stderr
.
decode
())
f
.
write
(
"-- stderr "
+
"-"
*
70
)
print
(
"-"
*
80
)
f
.
write
(
stderr
.
decode
())
f
.
write
(
"-"
*
80
)
print
(
"Finished in %.3fs"
%
elapsed
)
print
(
"Finished in %.3fs"
%
elapsed
)
if
failed
:
print
(
"Test report in /tmp/kazoo.err"
)
print
(
"%s tests, %s errors"
%
(
len
(
results
),
failed
))
print
(
"%s tests, %s errors"
%
(
len
(
results
),
failed
))
return
0
if
not
failed
else
1
return
0
if
not
failed
else
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment