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
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
Eric Zheng
slapos
Commits
cb6a12e0
Commit
cb6a12e0
authored
Aug 04, 2011
by
Priscila Manhaes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor for runnig cloudooo tests
parent
5c38aaa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
slapos/recipe/cloudoootestnode/testnode.py
slapos/recipe/cloudoootestnode/testnode.py
+11
-7
No files found.
slapos/recipe/cloudoootestnode/testnode.py
View file @
cb6a12e0
...
@@ -181,18 +181,20 @@ branch = %(branch)s
...
@@ -181,18 +181,20 @@ branch = %(branch)s
test_result_path
,
status_dict
,
config
[
'test_node_title'
])
test_result_path
,
status_dict
,
config
[
'test_node_title'
])
retry_software
=
True
retry_software
=
True
continue
continue
# create instances, it should take some seconds only
# create instances, it should take some seconds only
slapos_controler
.
runComputerPartition
(
config
,
slapos_controler
.
runComputerPartition
(
config
,
process_group_pid_set
=
process_group_pid_set
)
process_group_pid_set
=
process_group_pid_set
)
partition_path
=
os
.
path
.
join
(
config
[
'instance_root'
],
partition_path
=
os
.
path
.
join
(
config
[
'instance_root'
],
config
[
'partition_reference'
])
config
[
'partition_reference'
])
run_test_suite_path
=
os
.
path
.
join
(
partition_path
,
'bin'
,
run_test_suite_path
=
os
.
path
.
join
(
partition_path
,
'bin'
,
'runCloudoooUnitTest'
)
'runCloudoooUnitTest'
)
if
not
os
.
path
.
exists
(
run_test_suite_path
):
if
not
os
.
path
.
exists
(
run_test_suite_path
):
raise
ValueError
(
'No %r provided'
%
run_test_suite_path
)
raise
ValueError
(
'No %r provided'
%
run_test_suite_path
)
cloudooo_paster
=
os
.
path
.
join
(
partition_path
,
'bin'
,
'cloudooo_paster'
)
cloudooo_conf
=
os
.
path
.
join
(
partition_path
,
'etc'
,
'conversion_server.cfg'
)
run_test_suite_revision
=
revision
run_test_suite_revision
=
revision
if
isinstance
(
revision
,
tuple
):
if
isinstance
(
revision
,
tuple
):
...
@@ -201,15 +203,17 @@ branch = %(branch)s
...
@@ -201,15 +203,17 @@ 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' %
# config['software_root'])
# for test in cloudooo_tests:
invocation_list
=
[]
invocation_list
=
[]
if
line
[:
2
]
==
'#!'
:
if
line
[:
2
]
==
'#!'
:
invocation_list
=
line
[
2
:].
split
()
invocation_list
=
line
[
2
:].
split
()
invocation_list
.
extend
([
run_test_suite_path
,
invocation_list
.
extend
([
run_test_suite_path
,
'--test_suite'
,
config
[
'test_suite'
],
'--paster_path'
,
cloudooo_paster
,
'--revision'
,
revision
,
cloudooo_conf
,
'--test_suite_title'
,
test_suite_title
,
'testFfmpegServer'
])
'--node_quantity'
,
config
[
'node_quantity'
],
'--master_url'
,
config
[
'test_suite_master_url'
]])
run_test_suite
=
subprocess
.
Popen
(
invocation_list
)
run_test_suite
=
subprocess
.
Popen
(
invocation_list
)
process_group_pid_set
.
add
(
run_test_suite
.
pid
)
process_group_pid_set
.
add
(
run_test_suite
.
pid
)
run_test_suite
.
wait
()
run_test_suite
.
wait
()
...
...
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