Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Eteri
erp5_fork
Commits
1727fa3f
Commit
1727fa3f
authored
May 13, 2011
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rebuild software if there is a failure in order to not
have to restart processes manually
parent
d373ff40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
slapos/recipe/erp5.recipe.testnode/setup.py
slapos/recipe/erp5.recipe.testnode/setup.py
+1
-1
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
...erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
+14
-12
No files found.
slapos/recipe/erp5.recipe.testnode/setup.py
View file @
1727fa3f
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
name
=
"erp5.recipe.testnode"
name
=
"erp5.recipe.testnode"
version
=
'1.0.1
1
'
version
=
'1.0.1
3
'
def
read
(
name
):
def
read
(
name
):
return
open
(
name
).
read
()
return
open
(
name
).
read
()
...
...
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
View file @
1727fa3f
...
@@ -6,6 +6,7 @@ import slapos.slap
...
@@ -6,6 +6,7 @@ import slapos.slap
import
subprocess
import
subprocess
import
sys
import
sys
import
socket
import
socket
import
pprint
from
SlapOSControler
import
SlapOSControler
from
SlapOSControler
import
SlapOSControler
...
@@ -92,6 +93,7 @@ repository = %(repository_path)s
...
@@ -92,6 +93,7 @@ repository = %(repository_path)s
profile_content
+=
"
\
n
branch = %s"
%
branch
profile_content
+=
"
\
n
branch = %s"
%
branch
custom_profile
.
write
(
profile_content
)
custom_profile
.
write
(
profile_content
)
custom_profile
.
close
()
custom_profile
.
close
()
retry_software
=
False
try
:
try
:
while
True
:
while
True
:
# Make sure we have local repository
# Make sure we have local repository
...
@@ -107,9 +109,10 @@ repository = %(repository_path)s
...
@@ -107,9 +109,10 @@ repository = %(repository_path)s
updater
=
Updater
(
repository_path
,
git_binary
=
config
[
'git_binary'
])
updater
=
Updater
(
repository_path
,
git_binary
=
config
[
'git_binary'
])
updater
.
checkout
()
updater
.
checkout
()
revision
=
updater
.
getRevision
()
revision
=
updater
.
getRevision
()
if
previous_revision
==
revision
:
if
not
(
retry_software
)
and
previous_revision
==
revision
:
time
.
sleep
(
120
)
time
.
sleep
(
120
)
continue
continue
retry_software
=
False
previous_revision
=
revision
previous_revision
=
revision
print
config
print
config
...
@@ -140,17 +143,16 @@ repository = %(repository_path)s
...
@@ -140,17 +143,16 @@ repository = %(repository_path)s
# Now prepare the installation of SlapOS
# Now prepare the installation of SlapOS
slapos_controler
=
SlapOSControler
(
config
,
slapos_controler
=
SlapOSControler
(
config
,
process_group_pid_list
=
process_group_pid_list
)
process_group_pid_list
=
process_group_pid_list
)
if
run_software
:
# this should be always true later, but it is too slow for now
# this should be always true later, but it is too slow for now
status_dict
=
slapos_controler
.
runSoftwareRelease
(
config
,
status_dict
=
slapos_controler
.
runSoftwareRelease
(
config
,
environment
=
config
[
'environment'
],
environment
=
config
[
'environment'
],
process_group_pid_list
=
process_group_pid_list
,
process_group_pid_list
=
process_group_pid_list
,
)
)
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_suite_title'
])
test_result_path
,
status_dict
,
config
[
'test_suite_title'
])
retry_software
=
True
continue
continue
run_software
=
False
# create instances, it should take some seconds only
# create instances, it should take some seconds only
slapos_controler
.
runComputerPartition
(
config
,
slapos_controler
.
runComputerPartition
(
config
,
...
...
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