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
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
alecs_myu
erp5
Commits
8585bdb7
Commit
8585bdb7
authored
May 12, 2011
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
report building failures to the master
parent
c764e493
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
14 deletions
+16
-14
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/SlapOSControler.py
...cipe.testnode/src/erp5/recipe/testnode/SlapOSControler.py
+6
-7
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/__init__.py
...erp5.recipe.testnode/src/erp5/recipe/testnode/__init__.py
+2
-3
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
...erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
+7
-3
No files found.
slapos/recipe/erp5.recipe.testnode/setup.py
View file @
8585bdb7
from
setuptools
import
setup
,
find_packages
name
=
"erp5.recipe.testnode"
version
=
'1.0.
5
'
version
=
'1.0.
11
'
def
read
(
name
):
return
open
(
name
).
read
()
...
...
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/SlapOSControler.py
View file @
8585bdb7
...
...
@@ -56,16 +56,15 @@ class SlapOSControler(object):
slapgrid
=
subprocess
.
Popen
([
config
[
'slapgrid_software_binary'
],
'-v'
,
'-c'
,
#'--buildout-parameter',"'-U -N' -o",
config
[
'slapos_config'
]],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
process_group_pid_list
.
append
(
slapgrid
.
pid
)
slapgrid
.
wait
()
if
slapgrid
.
returncode
==
0
:
print
'Software installed properly'
break
else
:
raise
ValueError
(
"Slapgrid software failed"
)
print
'Problem with software installation, trying again'
time
.
sleep
(
600
)
stdout
,
stderr
=
slapgrid
.
communicate
()
status_dict
=
{
'status_code'
:
slapgrid
.
returncode
,
'stdout'
:
stdout
,
'stderr'
:
stderr
}
return
status_dict
def
runComputerPartition
(
self
,
config
,
process_group_pid_list
=
None
):
print
"SlapOSControler.runSoftwareRelease"
...
...
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/__init__.py
View file @
8585bdb7
...
...
@@ -73,7 +73,7 @@ class Recipe(BaseSlapRecipe):
ipv4_address
=
self
.
getLocalIPv4Address
(),
ipv6_address
=
self
.
getGlobalIPv6Address
(),
master_url
=
CONFIG
[
'master_url'
],
profile_
url
=
self
.
parameter_dict
[
'profile_url
'
],
profile_
path
=
self
.
parameter_dict
[
'profile_path
'
],
proxy_database
=
CONFIG
[
'proxy_database'
],
proxy_port
=
CONFIG
[
'proxy_port'
],
slapgrid_partition_binary
=
self
.
options
[
'slapgrid_partition_binary'
],
...
...
@@ -89,8 +89,7 @@ class Recipe(BaseSlapRecipe):
test_suite_master_url
=
self
.
parameter_dict
.
get
(
'test_suite_master_url'
,
None
),
test_suite_name
=
self
.
parameter_dict
.
get
(
'test_suite_name'
),
#slave_name=self.parameter_dict['slave_name'],
#slave_password=self.parameter_dict['slave_password'],
test_suite_title
=
self
.
parameter_dict
.
get
(
'test_suite_title'
),
bin_directory
=
self
.
bin_directory
,
foo
=
'bar'
,
# botenvironemnt is splittable string of key=value to substitute
...
...
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
View file @
8585bdb7
...
...
@@ -85,7 +85,7 @@ extends = %(software_config_path)s
[%(repository_name)s]
repository = %(repository_path)s
"""
%
{
'software_config_path'
:
os
.
path
.
join
(
repository_path
,
config
[
'profile_
url
'
]),
config
[
'profile_
path
'
]),
'repository_name'
:
repository_name
,
'repository_path'
:
repository_path
}
if
branch
is
not
None
:
...
...
@@ -126,7 +126,7 @@ repository = %(repository_path)s
assert
master
.
getProtocolRevision
()
==
1
test_result
=
safeRpcCall
(
master
.
createTestResult
,
config
[
'test_suite_name'
],
revision
,
[],
False
)
False
,
config
[
'test_suite_title'
]
)
print
"testnode, test_result : %r"
%
(
test_result
,)
if
test_result
:
test_result_path
,
test_revision
=
test_result
...
...
@@ -142,10 +142,14 @@ repository = %(repository_path)s
process_group_pid_list
=
process_group_pid_list
)
if
run_software
:
# this should be always true later, but it is too slow for now
slapos_controler
.
runSoftwareRelease
(
config
,
s
tatus_dict
=
s
lapos_controler
.
runSoftwareRelease
(
config
,
environment
=
config
[
'environment'
],
process_group_pid_list
=
process_group_pid_list
,
)
if
status_dict
[
'status_code'
]
!=
0
:
safeRpcCall
(
master
.
reportTaskFailure
,
test_result_path
,
status_dict
,
config
[
'test_suite_title'
])
continue
run_software
=
False
# create instances, it should take some seconds only
...
...
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