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
96a6e0e4
Commit
96a6e0e4
authored
Jun 06, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testrunner: read changeset/version info once for all tests
parent
31067e5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
greentest/testrunner.py
greentest/testrunner.py
+12
-12
No files found.
greentest/testrunner.py
View file @
96a6e0e4
...
@@ -264,22 +264,16 @@ def run_subprocess(arg, options):
...
@@ -264,22 +264,16 @@ def run_subprocess(arg, options):
return
retcode
[
0
],
output
,
output_printed
return
retcode
[
0
],
output
,
output_printed
def
spawn_subprocess
(
arg
,
options
):
def
spawn_subprocess
(
arg
,
options
,
base_params
):
success
=
False
success
=
False
if
options
.
db
:
if
options
.
db
:
module_name
=
arg
module_name
=
arg
if
module_name
.
endswith
(
'.py'
):
if
module_name
.
endswith
(
'.py'
):
module_name
=
module_name
[:
-
3
]
module_name
=
module_name
[:
-
3
]
from
datetime
import
datetime
from
datetime
import
datetime
params
=
{
'started_at'
:
datetime
.
now
(),
params
=
base_params
.
copy
()
'runid'
:
options
.
runid
,
params
.
update
({
'started_at'
:
datetime
.
now
(),
'test'
:
module_name
,
'test'
:
module_name
})
'python'
:
'%s.%s.%s'
%
sys
.
version_info
[:
3
],
'changeset'
:
get_changeset
(),
'libevent_version'
:
get_libevent_version
(),
'libevent_method'
:
get_libevent_method
(),
'uname'
:
options
.
uname
,
'retcode'
:
'TIMEOUT'
}
row_id
=
store_record
(
options
.
db
,
'test'
,
params
)
row_id
=
store_record
(
options
.
db
,
'test'
,
params
)
params
[
'id'
]
=
row_id
params
[
'id'
]
=
row_id
retcode
,
output
,
output_printed
=
run_subprocess
(
arg
,
options
)
retcode
,
output
,
output_printed
=
run_subprocess
(
arg
,
options
)
...
@@ -304,14 +298,20 @@ def spawn_subprocess(arg, options):
...
@@ -304,14 +298,20 @@ def spawn_subprocess(arg, options):
def
spawn_subprocesses
(
options
,
args
):
def
spawn_subprocesses
(
options
,
args
):
params
=
{
'runid'
:
options
.
runid
,
'python'
:
'%s.%s.%s'
%
sys
.
version_info
[:
3
],
'changeset'
:
get_changeset
(),
'libevent_version'
:
get_libevent_version
(),
'libevent_method'
:
get_libevent_method
(),
'uname'
:
platform
.
uname
()[
0
],
'retcode'
:
'TIMEOUT'
}
success
=
True
success
=
True
if
not
args
:
if
not
args
:
args
=
glob
.
glob
(
'test_*.py'
)
args
=
glob
.
glob
(
'test_*.py'
)
args
.
remove
(
'test_support.py'
)
args
.
remove
(
'test_support.py'
)
options
.
uname
=
platform
.
uname
()[
0
]
for
arg
in
args
:
for
arg
in
args
:
try
:
try
:
success
=
spawn_subprocess
(
arg
,
options
)
and
success
success
=
spawn_subprocess
(
arg
,
options
,
params
)
and
success
except
Exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
if
options
.
db
:
if
options
.
db
:
...
...
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