Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F2822390
clientenv.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
clientenv.py
View Options
#!/usr/bin/python
from
boothtestenv
import
BoothTestEnvironment
from
boothrunner
import
BoothRunner
class
ClientTestEnvironment
(
BoothTestEnvironment
):
mode
=
'client'
def
run_booth
(
self
,
config_text
=
None
,
config_file
=
None
,
lock_file
=
True
,
args
=
[],
expected_exitcode
=
0
,
debug
=
False
):
'''
Runs boothd.
Returns a (pid, return_code, stdout, stderr, runner) tuple,
where return_code/stdout/stderr are None iff pid is still running.
'''
self
.
init_log
()
runner
=
BoothRunner
(
self
.
boothd_path
,
self
.
mode
,
args
)
runner
.
show_args
()
(
pid
,
return_code
,
stdout
,
stderr
)
=
runner
.
run
()
self
.
check_return_code
(
pid
,
return_code
,
expected_exitcode
)
return
(
pid
,
return_code
,
stdout
,
stderr
,
runner
)
def
_test_buffer_overflow
(
self
,
expected_error
,
**
args
):
(
pid
,
ret
,
stdout
,
stderr
,
runner
)
=
\
self
.
run_booth
(
expected_exitcode
=
1
,
**
args
)
self
.
assertRegexpMatches
(
stderr
,
expected_error
)
File Metadata
Details
Attached
Mime Type
text/x-script.python
Expires
Sat, Jan 25, 5:39 AM (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1226180
Default Alt Text
clientenv.py (1 KB)
Attached To
Mode
rB Booth
Attached
Detach File
Event Timeline
Log In to Comment