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
Lisa Casino
slapos
Commits
346ff3bb
Commit
346ff3bb
authored
Jun 29, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup test result when SubprocessError is raised.
parent
5515a973
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
slapos/recipe/erp5testnode/testnode.py
slapos/recipe/erp5testnode/testnode.py
+11
-3
No files found.
slapos/recipe/erp5testnode/testnode.py
View file @
346ff3bb
...
...
@@ -152,6 +152,7 @@ branch = %(branch)s
retry_software
=
False
try
:
while
True
:
remote_test_result_needs_cleanup
=
False
# kill processes from previous loop if any
try
:
killPreviousRun
(
process_group_pid_set
,
supervisord_pid_file
)
...
...
@@ -199,6 +200,7 @@ branch = %(branch)s
config
[
'test_suite'
],
revision
,
[],
False
,
test_suite_title
,
config
[
'test_node_title'
],
config
[
'project_title'
])
remote_test_result_needs_cleanup
=
True
log
(
"testnode, test_result : %r"
%
(
test_result
,
))
if
test_result
:
test_result_path
,
test_revision
=
test_result
...
...
@@ -227,8 +229,6 @@ branch = %(branch)s
stdout
=
stdout
,
stderr
=
stderr
)
if
status_dict
[
'status_code'
]
!=
0
:
safeRpcCall
(
master
.
reportTaskFailure
,
test_result_path
,
status_dict
,
config
[
'test_node_title'
])
retry_software
=
True
raise
SubprocessError
(
status_dict
)
...
...
@@ -260,11 +260,19 @@ branch = %(branch)s
'--test_suite_title'
,
test_suite_title
,
'--node_quantity'
,
config
[
'node_quantity'
],
'--master_url'
,
config
[
'test_suite_master_url'
]])
# From this point, test runner becomes responsible for updating test
# result.
# XXX: is it good for all cases (eg: test runner fails too early for
# any custom code to pick the failure up and react ?)
remote_test_result_needs_cleanup
=
False
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
,
e
:
if
remote_test_result_needs_cleanup
:
safeRpcCall
(
master
.
reportTaskFailure
,
test_result_path
,
e
.
status_dict
,
config
[
'test_node_title'
])
time
.
sleep
(
120
)
finally
:
...
...
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