Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
37f3a15f
Commit
37f3a15f
authored
Sep 07, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update egg_test and erp5_test to support specific environment
parent
fddc2b79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
9 deletions
+34
-9
slapos/recipe/erp5_test/__init__.py
slapos/recipe/erp5_test/__init__.py
+30
-9
slapos/recipe/erp5_test/test.py
slapos/recipe/erp5_test/test.py
+4
-0
No files found.
slapos/recipe/erp5_test/__init__.py
View file @
37f3a15f
...
...
@@ -100,16 +100,37 @@ class CloudoooRecipe(GenericBaseRecipe):
return
path_list
class
EggTestRecipe
(
GenericBaseRecipe
):
"""
Recipe used to create wrapper used to run test suite (python setup.py test)
off a list of Python eggs.
"""
def
install
(
self
):
path_list
=
[]
common_dict
=
dict
()
# prepend_path=self.options['prepend-path'],
#)
common_list
=
[
"--source-core-path-list"
,
self
.
options
[
'test-list'
]]
path_list
.
append
(
self
.
createPythonScript
(
self
.
options
[
'run-test-suite'
],
__name__
+
'.test.runTestSuite'
,
[
dict
(
call_list
=
[
self
.
options
[
'run-test-suite-binary'
],
]
+
common_list
,
**
common_dict
)]))
test_list
=
self
.
options
[
'test-list'
].
strip
().
replace
(
'
\
n
'
,
','
)
common_dict
=
{}
return
path_list
environment_dict
=
{}
if
self
.
options
.
get
(
'environment'
):
environment_part
=
self
.
buildout
.
get
(
self
.
options
[
'environment'
])
if
environment_part
:
for
key
,
value
in
environment_part
.
iteritems
():
environment_dict
[
key
]
=
value
common_list
=
[
"--source_code_path_list"
,
test_list
]
argument_dict
=
dict
(
call_list
=
[
self
.
options
[
'run-test-suite-binary'
],]
+
common_list
,
environment
=
environment_dict
,
**
common_dict
)
if
'prepend-path'
in
self
.
options
:
argument_dict
[
'prepend_path'
]
=
self
.
options
[
'prepend-path'
]
run_test_suite_script
=
self
.
createPythonScript
(
self
.
options
[
'run-test-suite'
],
__name__
+
'.test.runTestSuite'
,
[
argument_dict
]
)
path_list
.
append
(
run_test_suite_script
)
return
path_list
slapos/recipe/erp5_test/test.py
View file @
37f3a15f
...
...
@@ -39,6 +39,10 @@ def runTestSuite(args):
env
[
'INSTANCE_HOME'
]
=
d
[
'instance_home'
]
env
[
'REAL_INSTANCE_HOME'
]
=
d
[
'instance_home'
]
# If defined, will add (and replace if existing) envvars to environment.
if
'environment'
in
d
:
env
.
update
(
d
[
'environment'
])
# Deal with Shebang size limitation
executable_filepath
=
d
[
'call_list'
][
0
]
file_object
=
open
(
executable_filepath
,
'r'
)
...
...
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