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
Mikolaï Krol
erp5
Commits
81ec6cab
Commit
81ec6cab
authored
May 13, 2011
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using subprocess.PIPE was a bad idea, buildout was so slow.
Use real files instead
parent
ddfe3e8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
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
+13
-5
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
...erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
+3
-2
No files found.
slapos/recipe/erp5.recipe.testnode/setup.py
View file @
81ec6cab
from
setuptools
import
setup
,
find_packages
name
=
"erp5.recipe.testnode"
version
=
'1.0.1
3
'
version
=
'1.0.1
6
'
def
read
(
name
):
return
open
(
name
).
read
()
...
...
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/SlapOSControler.py
View file @
81ec6cab
...
...
@@ -5,7 +5,6 @@ class SlapOSControler(object):
def
__init__
(
self
,
config
,
process_group_pid_list
=
None
):
self
.
config
=
config
self
.
process_group_pid_list
=
[]
# By erasing everything, we make sure that we are able to "update"
# existing profiles. This is quite dirty way to do updates...
if
os
.
path
.
exists
(
config
[
'proxy_database'
]):
...
...
@@ -53,17 +52,26 @@ class SlapOSControler(object):
cpu_count
=
os
.
sysconf
(
"SC_NPROCESSORS_ONLN"
)
os
.
putenv
(
'MAKEFLAGS'
,
'-j%s'
%
cpu_count
)
os
.
environ
[
'PATH'
]
=
environment
[
'PATH'
]
stdout
=
open
(
os
.
path
.
join
(
config
[
'instance_root'
],
'.runSoftwareRelease_out'
),
'w+'
)
stderr
=
open
(
os
.
path
.
join
(
config
[
'instance_root'
],
'.runSoftwareRelease_err'
),
'w+'
)
slapgrid
=
subprocess
.
Popen
([
config
[
'slapgrid_software_binary'
],
'-v'
,
'-c'
,
#'--buildout-parameter',"'-U -N' -o",
config
[
'slapos_config'
]],
stdout
=
s
ubprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stdout
=
s
tdout
,
stderr
=
stderr
,
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
process_group_pid_list
.
append
(
slapgrid
.
pid
)
slapgrid
.
wait
()
stdout
,
stderr
=
slapgrid
.
communicate
()
stdout
.
seek
(
0
)
stderr
.
seek
(
0
)
status_dict
=
{
'status_code'
:
slapgrid
.
returncode
,
'stdout'
:
stdout
,
'stderr'
:
stderr
}
'stdout'
:
stdout
.
read
(),
'stderr'
:
stderr
.
read
()}
stdout
.
close
()
stderr
.
close
()
return
status_dict
def
runComputerPartition
(
self
,
config
,
process_group_pid_list
=
None
):
...
...
slapos/recipe/erp5.recipe.testnode/src/erp5/recipe/testnode/testnode.py
View file @
81ec6cab
...
...
@@ -109,9 +109,10 @@ repository = %(repository_path)s
updater
=
Updater
(
repository_path
,
git_binary
=
config
[
'git_binary'
])
updater
.
checkout
()
revision
=
updater
.
getRevision
()
if
not
(
retry_software
)
and
previous_revision
==
revision
:
if
previous_revision
==
revision
:
time
.
sleep
(
120
)
continue
if
not
(
retry_software
):
continue
retry_software
=
False
previous_revision
=
revision
...
...
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