Commit 60092578 authored by Julien Muchembled's avatar Julien Muchembled

cython_test: generate a cython_env.sh for development

parent f19b241c
Pipeline #9174 failed with stage
in 0 seconds
......@@ -7,19 +7,10 @@ from time import gmtime, strftime, time
from unittest import TextTestResult
from erp5.util import taskdistribution, testsuite
{%- if prepend_path is defined %}
PATH = os.environ['PATH']
os.environ['PATH'] = {{ repr(prepend_path) }} + (PATH and os.pathsep + PATH)
{%- endif %}
os.environ['TEMP'] = {{ repr(tmpdir) }}
os.environ['PYTHON'] = sys.executable
os.environ['PYTHONPATH'] = os.pathsep.join(
sys.path[:-int(subprocess.check_output((
sys.executable, '-c', 'import sys;print(len(sys.path))')))])
command = """set -e {{ gettext_location }}/lib
make
LD_RUN_PATH=$1 LIBRARY_PATH=$1 make test
command = """. {{ cython_env_sh }}
make all test
"""
def parseTestStdOut(data):
......
......@@ -41,19 +41,14 @@ template =
key tmpdir directory:tmp
key slapparameter_dict slap-configuration:configuration
key cython_repository cython-repository:location
raw runTestSuite_py ${buildout:bin-directory}/${runTestSuite_py:interpreter}
raw gettext_location ${gettext:location}
{%- if 'part' in gcc %}
raw prepend_path {{ gcc.prefix }}/bin
{%- endif %}
raw runTestSuite_py ${runTestSuite_py:bin-directory}/${runTestSuite_py:interpreter}
raw cython_env_sh ${cython_env.sh:rendered}
[cython-repository]
recipe = slapos.recipe.build:gitclone
repository = ${cython-repository:location}
git-executable = ${git:location}/bin/git
shared = true
context =
section gcc gcc
[cython-repository]
recipe = slapos.recipe.build:gitclone
......@@ -64,16 +59,45 @@ sparse-checkout = /.gitignore
[runTestSuite.in]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}
md5sum = aea029e484875a1e6e69f9e2e1d9efdd
md5sum = 02094e80cde9631081077fc96b401065
[runTestSuite_py]
recipe = zc.recipe.egg
eggs = erp5.util
interpreter = ${:_buildout_section_name_}
[eggs]
recipe = zc.recipe.egg
eggs =
erp5.util
${numpy:egg}
coverage
pycodestyle
interpreter = ${:_buildout_section_name_}
[cython_env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template =
inline:{% set path, python = os.path.split(python) -%}
{% if 'part' in gcc -%}
{% set path = path + ':' + gcc.prefix + '/bin' -%}
{% endif -%}
export PATH={{ path }}:$PATH
export PYTHON={{ python }}
export PYTHONPATH={{ ':'.join(easy_install.working_set(eggs['eggs'].split(), [
eggs['develop-eggs-directory'],
eggs['eggs-directory'],
]).entries) }}$${PYTHONPATH:+:$PYTHONPATH}
# EmbedTest needs libintl.
export LD_RUN_PATH={{ gettext }}/lib$${LD_RUN_PATH:+:$LD_RUN_PATH}
export LIBRARY_PATH={{ gettext }}/lib$${LIBRARY_PATH:+:$LIBRARY_PATH}
{##}
context =
section eggs eggs
section gcc gcc
key gettext gettext:location
key python python:executable
import os os
import easy_install zc.buildout.easy_install
[versions]
slapos.recipe.template = 4.4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment