Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Kirill Smelkov
ZODB
Commits
ef6b70fd
Commit
ef6b70fd
authored
Apr 29, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provided more control over the way test servers are run to make
debugging easier.
parent
ba8ee57f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+10
-5
src/ZEO/tests/zeoserver.py
src/ZEO/tests/zeoserver.py
+3
-1
No files found.
src/ZEO/tests/forker.py
View file @
ef6b70fd
...
...
@@ -42,6 +42,7 @@ class ZEOConfig:
self
.
authentication_protocol
=
None
self
.
authentication_database
=
None
self
.
authentication_realm
=
None
self
.
loglevel
=
'INFO'
def
dump
(
self
,
f
):
print
>>
f
,
"<zeo>"
...
...
@@ -66,12 +67,12 @@ class ZEOConfig:
print
>>
f
,
"""
<eventlog>
level
INFO
level
%s
<logfile>
path server-%s.log
</logfile>
</eventlog>
"""
%
self
.
address
[
1
]
"""
%
(
self
.
loglevel
,
self
.
address
[
1
])
def
__str__
(
self
):
f
=
StringIO
.
StringIO
()
...
...
@@ -90,7 +91,7 @@ def encode_format(fmt):
def
start_zeo_server
(
storage_conf
=
None
,
zeo_conf
=
None
,
port
=
None
,
keep
=
False
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
,
suicide
=
True
):
suicide
=
True
,
debug
=
False
):
"""Start a ZEO server in a separate process.
Takes two positional arguments a string containing the storage conf
...
...
@@ -133,6 +134,8 @@ def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False,
args
=
[
qa
(
sys
.
executable
),
qa
(
script
),
'-C'
,
qa
(
tmpfile
)]
if
keep
:
args
.
append
(
"-k"
)
if
debug
:
args
.
append
(
"-d"
)
if
not
suicide
:
args
.
append
(
"-S"
)
if
protocol
:
...
...
@@ -288,7 +291,8 @@ def setUp(test):
servers
=
{}
def
start_server
(
storage_conf
=
None
,
zeo_conf
=
None
,
port
=
None
,
keep
=
False
,
addr
=
None
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
):
addr
=
None
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
,
suicide
=
True
,
debug
=
False
):
"""Start a ZEO server.
Return the server and admin addresses.
...
...
@@ -301,7 +305,8 @@ def setUp(test):
elif
addr
is
not
None
:
raise
TypeError
(
"Can't specify port and addr"
)
addr
,
adminaddr
,
pid
,
config_path
=
start_zeo_server
(
storage_conf
,
zeo_conf
,
port
,
keep
,
path
,
protocol
,
blob_dir
)
storage_conf
,
zeo_conf
,
port
,
keep
,
path
,
protocol
,
blob_dir
,
suicide
,
debug
)
os
.
remove
(
config_path
)
servers
[
adminaddr
]
=
pid
return
addr
,
adminaddr
...
...
src/ZEO/tests/zeoserver.py
View file @
ef6b70fd
...
...
@@ -153,10 +153,12 @@ def main():
configfile
=
None
suicide
=
True
# Parse the arguments and let getopt.error percolate
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'kSC:v:'
)
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'
d
kSC:v:'
)
for
opt
,
arg
in
opts
:
if
opt
==
'-k'
:
keep
=
1
if
opt
==
'-d'
:
ZEO
.
zrpc
.
connection
.
debug_zrpc
=
True
elif
opt
==
'-C'
:
configfile
=
arg
elif
opt
==
'-S'
:
...
...
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