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
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
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):
if
profile_content
is
None
:
profile_content
=
"""
[buildout]
extends = /home/slap/config/cloudooo.cfg
"""
#extends = %(software_config_path)s
#""" % {'software_config_path': os.path.join(repository_path,
# config['profile_path'])}
extends = %(software_config_path)s
"""
%
{
'software_config_path'
:
os
.
path
.
join
(
repository_path
,
config
[
'profile_path'
])}
if
not
(
buildout_section_id
is
None
):
profile_content
+=
"""
\
n
[%(buildout_section_id)s]
...
...
@@ -107,6 +105,7 @@ branch = %(branch)s
"""
%
{
'buildout_section_id'
:
buildout_section_id
,
'repository_path'
:
repository_path
,
'branch'
:
vcs_repository
.
get
(
'branch'
,
'cloudooo'
)}
custom_profile
=
open
(
custom_profile_path
,
'w'
)
custom_profile
.
write
(
profile_content
)
custom_profile
.
close
()
...
...
@@ -149,8 +148,9 @@ branch = %(branch)s
continue
retry_software
=
False
previous_revision
=
revision
# Require build connection for runnig tests
print
config
# Require build connection for runnig tests
portal_url
=
config
[
'test_suite_master_url'
]
test_result_path
=
None
test_result
=
(
test_result_path
,
revision
)
...
...
@@ -216,21 +216,8 @@ branch = %(branch)s
file_object
=
open
(
run_test_suite_path
,
'r'
)
line
=
file_object
.
readline
()
file_object
.
close
()
# cloudooo_tests = glob(
# '%s/*/src/cloudooo/cloudooo/handler/*/tests/test*.py' %
# 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
)
wait_serve
=
True
while
wait_serve
:
try
:
conf
=
open
(
cloudooo_conf
).
read
()
...
...
@@ -244,8 +231,11 @@ branch = %(branch)s
except
socket
.
error
,
e
:
wait_serve
=
True
time
.
sleep
(
10
)
cloudooo_tests
=
glob
(
'%s/*/src/cloudooo/cloudooo/handler/*/tests/test*.py'
%
config
[
'software_root'
])
for
test
in
cloudooo_tests
:
print
time
.
strftime
(
"%a, %d %b %Y %H:%M:%S +0000"
,
time
.
gmtime
())
invocation_list
=
[]
if
line
[:
2
]
==
'#!'
:
invocation_list
=
line
[
2
:].
split
()
...
...
@@ -253,6 +243,10 @@ branch = %(branch)s
'--paster_path'
,
cloudooo_paster
,
cloudooo_conf
,
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
:
time
.
sleep
(
120
)
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