Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
61202306
Commit
61202306
authored
Mar 18, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No commit message
No commit message
parent
01ff45c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+17
-3
src/zc/buildout/testing.txt
src/zc/buildout/testing.txt
+13
-0
No files found.
src/zc/buildout/testing.py
View file @
61202306
...
...
@@ -242,14 +242,27 @@ class Server(BaseHTTPServer.HTTPServer):
class
Handler
(
BaseHTTPServer
.
BaseHTTPRequestHandler
):
Server
.
__log
=
False
def
__init__
(
self
,
request
,
address
,
server
):
self
.
__server
=
server
self
.
tree
=
server
.
tree
BaseHTTPServer
.
BaseHTTPRequestHandler
.
__init__
(
self
,
request
,
address
,
server
)
def
do_GET
(
self
):
if
'__stop__'
in
self
.
path
:
raise
SystemExit
raise
SystemExit
if
self
.
path
==
'/enable_server_logging'
:
self
.
__server
.
__log
=
True
self
.
send_response
(
200
)
return
if
self
.
path
==
'/disable_server_logging'
:
self
.
__server
.
__log
=
False
self
.
send_response
(
200
)
return
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
self
.
tree
,
*
self
.
path
.
split
(
'/'
)))
if
not
(
...
...
@@ -295,8 +308,9 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
self
.
wfile
.
write
(
out
)
def
log_request
(
*
s
):
pass
def
log_request
(
self
,
code
):
if
self
.
__server
.
__log
:
print
'%s %s %s'
%
(
self
.
command
,
code
,
self
.
path
)
def
_run
(
tree
,
port
):
server_address
=
(
'localhost'
,
port
)
...
...
src/zc/buildout/testing.txt
View file @
61202306
...
...
@@ -90,6 +90,19 @@ number of names to the test namespace:
Start a web server on the given path. The server will be shut
down at the end of the test. The server URL is returned.
You can cause the server to start and stop logging it's output
using:
>>> get(server_url+'enable_server_logging')
and:
>>> get(server_url+'enable_server_logging')
This can be useful to see how buildout is interacting with a
server.
``sdist(setup, dest)``
Create a source distribution by running the given setup file and
placing the result in the given destination directory. If the
...
...
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