Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Alain Takoudjou
slapos
Commits
78099114
Commit
78099114
authored
Aug 26, 2011
by
Priscila Manhaes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TYPO
parent
5c76fa33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
22 deletions
+16
-22
slapos/recipe/cloudoootestnode/testnode.py
slapos/recipe/cloudoootestnode/testnode.py
+16
-22
No files found.
slapos/recipe/cloudoootestnode/testnode.py
View file @
78099114
...
@@ -94,11 +94,9 @@ def run(args):
...
@@ -94,11 +94,9 @@ def run(args):
if
profile_content
is
None
:
if
profile_content
is
None
:
profile_content
=
"""
profile_content
=
"""
[buildout]
[buildout]
extends = /home/slap/config/cloudooo.cfg
extends = %(software_config_path)s
"""
"""
%
{
'software_config_path'
:
os
.
path
.
join
(
repository_path
,
#extends = %(software_config_path)s
config
[
'profile_path'
])}
#""" % {'software_config_path': os.path.join(repository_path,
# config['profile_path'])}
if
not
(
buildout_section_id
is
None
):
if
not
(
buildout_section_id
is
None
):
profile_content
+=
"""
\
n
profile_content
+=
"""
\
n
[%(buildout_section_id)s]
[%(buildout_section_id)s]
...
@@ -107,6 +105,7 @@ branch = %(branch)s
...
@@ -107,6 +105,7 @@ branch = %(branch)s
"""
%
{
'buildout_section_id'
:
buildout_section_id
,
"""
%
{
'buildout_section_id'
:
buildout_section_id
,
'repository_path'
:
repository_path
,
'repository_path'
:
repository_path
,
'branch'
:
vcs_repository
.
get
(
'branch'
,
'cloudooo'
)}
'branch'
:
vcs_repository
.
get
(
'branch'
,
'cloudooo'
)}
custom_profile
=
open
(
custom_profile_path
,
'w'
)
custom_profile
=
open
(
custom_profile_path
,
'w'
)
custom_profile
.
write
(
profile_content
)
custom_profile
.
write
(
profile_content
)
custom_profile
.
close
()
custom_profile
.
close
()
...
@@ -149,8 +148,9 @@ branch = %(branch)s
...
@@ -149,8 +148,9 @@ branch = %(branch)s
continue
continue
retry_software
=
False
retry_software
=
False
previous_revision
=
revision
previous_revision
=
revision
# Require build connection for runnig tests
print
config
print
config
# Require build connection for runnig tests
portal_url
=
config
[
'test_suite_master_url'
]
portal_url
=
config
[
'test_suite_master_url'
]
test_result_path
=
None
test_result_path
=
None
test_result
=
(
test_result_path
,
revision
)
test_result
=
(
test_result_path
,
revision
)
...
@@ -216,21 +216,8 @@ branch = %(branch)s
...
@@ -216,21 +216,8 @@ branch = %(branch)s
file_object
=
open
(
run_test_suite_path
,
'r'
)
file_object
=
open
(
run_test_suite_path
,
'r'
)
line
=
file_object
.
readline
()
line
=
file_object
.
readline
()
file_object
.
close
()
file_object
.
close
()
# cloudooo_tests = glob(
# '%s/*/src/cloudooo/cloudooo/handler/*/tests/test*.py' %
wait_serve
=
True
# config['software_root'])
# for test in cloudooo_tests:
invocation_list
=
[]
if
line
[:
2
]
==
'#!'
:
invocation_list
=
line
[
2
:].
split
()
invocation_list
.
extend
([
run_test_suite_path
,
'--paster_path'
,
cloudooo_paster
,
cloudooo_conf
,
'testFfmpegServer'
])
run_test_suite
=
subprocess
.
Popen
(
invocation_list
)
process_group_pid_set
.
add
(
run_test_suite
.
pid
)
run_test_suite
.
wait
()
process_group_pid_set
.
remove
(
run_test_suite
.
pid
)
while
wait_serve
:
while
wait_serve
:
try
:
try
:
conf
=
open
(
cloudooo_conf
).
read
()
conf
=
open
(
cloudooo_conf
).
read
()
...
@@ -244,8 +231,11 @@ branch = %(branch)s
...
@@ -244,8 +231,11 @@ branch = %(branch)s
except
socket
.
error
,
e
:
except
socket
.
error
,
e
:
wait_serve
=
True
wait_serve
=
True
time
.
sleep
(
10
)
time
.
sleep
(
10
)
cloudooo_tests
=
glob
(
'%s/*/src/cloudooo/cloudooo/handler/*/tests/test*.py'
%
config
[
'software_root'
])
for
test
in
cloudooo_tests
:
for
test
in
cloudooo_tests
:
print
time
.
strftime
(
"%a, %d %b %Y %H:%M:%S +0000"
,
time
.
gmtime
())
invocation_list
=
[]
invocation_list
=
[]
if
line
[:
2
]
==
'#!'
:
if
line
[:
2
]
==
'#!'
:
invocation_list
=
line
[
2
:].
split
()
invocation_list
=
line
[
2
:].
split
()
...
@@ -253,6 +243,10 @@ branch = %(branch)s
...
@@ -253,6 +243,10 @@ branch = %(branch)s
'--paster_path'
,
cloudooo_paster
,
'--paster_path'
,
cloudooo_paster
,
cloudooo_conf
,
cloudooo_conf
,
test
.
split
(
'/'
)[
-
1
]])
test
.
split
(
'/'
)[
-
1
]])
run_test_suite
=
subprocess
.
Popen
(
invocation_list
)
process_group_pid_set
.
add
(
run_test_suite
.
pid
)
run_test_suite
.
wait
()
process_group_pid_set
.
remove
(
run_test_suite
.
pid
)
except
SubprocessError
:
except
SubprocessError
:
time
.
sleep
(
120
)
time
.
sleep
(
120
)
continue
continue
...
...
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