Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Mukul
erp5
Commits
1804e3c3
Commit
1804e3c3
authored
Jun 14, 2011
by
Sebastien Robin
Committed by
Julien Muchembled
Jul 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make runComputerPartition reporting errors to the master
parent
b85c7f25
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
slapos/recipe/erp5testnode/SlapOSControler.py
slapos/recipe/erp5testnode/SlapOSControler.py
+9
-3
slapos/recipe/erp5testnode/testnode.py
slapos/recipe/erp5testnode/testnode.py
+11
-11
No files found.
slapos/recipe/erp5testnode/SlapOSControler.py
View file @
1804e3c3
...
@@ -76,9 +76,15 @@ class SlapOSControler(object):
...
@@ -76,9 +76,15 @@ class SlapOSControler(object):
partition_reference
=
'testing partition'
,
partition_reference
=
'testing partition'
,
partition_parameter_kw
=
config
[
'instance_dict'
])
partition_parameter_kw
=
config
[
'instance_dict'
])
slapgrid
=
subprocess
.
Popen
([
config
[
'slapgrid_partition_binary'
],
slapgrid
=
subprocess
.
Popen
([
config
[
'slapgrid_partition_binary'
],
config
[
'slapos_config'
],
'-c'
,
'-v'
],
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
config
[
'slapos_config'
],
'-c'
,
'-v'
],
stdout
=
stdout
,
stderr
=
stderr
,
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
process_group_pid_set
.
add
(
slapgrid
.
pid
)
process_group_pid_set
.
add
(
slapgrid
.
pid
)
slapgrid
.
wait
()
slapgrid
.
wait
()
process_group_pid_set
.
remove
(
slapgrid
.
pid
)
process_group_pid_set
.
remove
(
slapgrid
.
pid
)
if
slapgrid
.
returncode
!=
0
:
status_dict
=
{
'status_code'
:
slapgrid
.
returncode
,
raise
ValueError
(
'Slapgrid instance failed'
)
'stdout'
:
stdout
.
read
(),
'stderr'
:
stderr
.
read
()}
stdout
.
close
()
stderr
.
close
()
return
status_dict
\ No newline at end of file
slapos/recipe/erp5testnode/testnode.py
View file @
1804e3c3
...
@@ -178,25 +178,25 @@ branch = %(branch)s
...
@@ -178,25 +178,25 @@ branch = %(branch)s
revision
=
repository_revision
.
split
(
'-'
)[
1
])
revision
=
repository_revision
.
split
(
'-'
)[
1
])
updater
.
checkout
()
updater
.
checkout
()
# Now prepare the installation of SlapOS
# Now prepare the installation of SlapOS
and create instance
slapos_controler
=
SlapOSControler
(
config
,
slapos_controler
=
SlapOSControler
(
config
,
process_group_pid_set
=
process_group_pid_set
)
process_group_pid_set
=
process_group_pid_set
)
stdout
,
stderr
=
getInputOutputFileList
(
config
,
"runSoftwareRelease"
)
for
method_name
in
(
"runSoftwareRelease"
,
"runComputerPartition"
):
status_dict
=
slapos_controler
.
runSoftwareRelease
(
config
,
stdout
,
stderr
=
getInputOutputFileList
(
config
,
method_name
)
slapos_method
=
getattr
(
slapos_controler
,
method_name
)
status_dict
=
slapos_method
(
config
,
environment
=
config
[
'environment'
],
environment
=
config
[
'environment'
],
process_group_pid_set
=
process_group_pid_set
,
process_group_pid_set
=
process_group_pid_set
,
stdout
=
stdout
,
stderr
=
stderr
stdout
=
stdout
,
stderr
=
stderr
)
)
if
status_dict
[
'status_code'
]
!=
0
:
break
if
status_dict
[
'status_code'
]
!=
0
:
if
status_dict
[
'status_code'
]
!=
0
:
safeRpcCall
(
master
.
reportTaskFailure
,
safeRpcCall
(
master
.
reportTaskFailure
,
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
slapos_controler
.
runComputerPartition
(
config
,
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'
,
...
...
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