Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
b03802ad
Commit
b03802ad
authored
May 30, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test__benchmarks.py: better error reporting
parent
30e9e05f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
greentest/test__benchmarks.py
greentest/test__benchmarks.py
+15
-12
No files found.
greentest/test__benchmarks.py
View file @
b03802ad
...
...
@@ -4,11 +4,13 @@ import mysubprocess as subprocess
import
time
TIMEOUT
=
10
def
system
(
command
):
p
=
subprocess
.
Popen
(
command
,
shell
=
True
)
try
:
start
=
time
.
time
()
while
time
.
time
()
<
start
+
10
and
p
.
poll
()
is
None
:
while
time
.
time
()
<
start
+
TIMEOUT
and
p
.
poll
()
is
None
:
time
.
sleep
(
0.1
)
if
p
.
poll
()
is
None
:
p
.
kill
()
...
...
@@ -24,20 +26,21 @@ modules = set()
for
path
in
glob
.
glob
(
'bench_*.py'
):
modules
.
add
(
path
)
assert
modules
error
=
0
if
__name__
==
'__main__'
:
assert
modules
errors
=
[]
for
path
in
modules
:
print
(
path
)
sys
.
stderr
.
write
(
path
+
'
\
n
'
)
sys
.
stdout
.
flush
()
res
=
system
(
'%s %s all'
%
(
sys
.
executable
,
path
))
command
=
'%s %s all'
%
(
sys
.
executable
,
path
)
res
=
system
(
command
)
if
res
:
error
=
1
print
(
'%s %s'
%
(
path
,
'failed'
))
print
(
'-----'
)
error
=
'%r failed with code %s'
%
(
command
,
res
)
sys
.
stderr
.
write
(
error
+
'
\
n
'
)
errors
.
append
(
error
)
sys
.
stderr
.
write
(
'-----
\
n
\
n
'
)
if
error
:
sys
.
exit
(
1
)
if
error
s
:
sys
.
exit
(
'
\
n
'
.
join
(
errors
)
)
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