Commit 3d36830c authored by Jérome Perrin's avatar Jérome Perrin

software-testing: install tested egg via software buildout

Instead of running python setup.py that will install again egg with
maybe different versions of dependencies, use buildout way of installing
eggs and dependencies.

Also fix erp5-util erp5.util typo, we'll have to update test suites
defining a reporsitory for this.
parent b33652e9
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# But avoid directories, they are not portable.
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template]
filename = instance.cfg
md5sum = d1eea2e49a5ecd119d3f686a1af823a9
[buildout]
parts =
slapos.core-setup
erp5.util-setup
phantomjs-wrapper
slapos-test-runner
sh-environment
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -24,54 +21,6 @@ bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
services = $${:etc}/run
srv = $${buildout:directory}/srv
source-code = $${:srv}/eggs-source-code
[download-source]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
# Local development
[slapos.core]
<= download-source
repository = ${slapos.core-repository:location}
[slapos.core-setup]
recipe = plone.recipe.command
command = echo "Updating setup...";cd $${slapos.core:location}; export PATH="$${slapos-test-runner:prepend-path}:$PATH"; export CPPFLAGS="$${environment:CPPFLAGS}"; export LDFLAGS="$${environment:LDFLAGS}"; export PYTHONPATH="$${environment:PYTHONPATH}"; export LOCAL_IPV4="$${environment:LOCAL_IPV4}"; ${python2.7:location}/bin/python setup.py test -n; ${python2.7:location}/bin/python setup.py test -n; ${python2.7:location}/bin/python setup.py test -n; ${python2.7:location}/bin/python setup.py test -n
update-command = $${:command}
[caucase]
<= download-source
repository = ${caucase-repository:location}
[slapos.cookbook]
<= download-source
repository = ${slapos.cookbook-repository:location}
[slapos.recipe.template]
<= download-source
repository = ${slapos.recipe.template-repository:location}
[slapos.recipe.build]
<= download-source
repository = ${slapos.recipe.build-repository:location}
[slapos.recipe.cmmi]
<= download-source
repository = ${slapos.recipe.cmmi-repository:location}
[slapos.toolbox]
<= download-source
repository = ${slapos.toolbox-repository:location}
[erp5-util]
<= download-source
repository = ${erp5-util-repository:location}
[erp5.util-setup]
recipe = plone.recipe.command
command = echo "Updating setup...";cd $${erp5-util:location}; export PATH="$${slapos-test-runner:prepend-path}:$PATH"; export CPPFLAGS="$${environment:CPPFLAGS}"; export LDFLAGS="$${environment:LDFLAGS}"; export PYTHONPATH="$${environment:PYTHONPATH}"; ${python2.7:location}/bin/python setup.py test -n; ${python2.7:location}/bin/python setup.py test -n; ${python2.7:location}/bin/python setup.py test -n; ${python2.7:location}/bin/python setup.py test -n; ${python2.7:location}/bin/python setup.py test -n
update-command = $${:command}
[slapos-test-runner]
recipe = slapos.cookbook:egg_test
......@@ -81,36 +30,16 @@ run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
# of tests should dynamically generated.
#python-list = $${}
test-list =
$${caucase:location}
$${erp5.util:location}
$${slapos.cookbook:location}
$${slapos.core:location}
$${slapos.recipe.template:location}
$${slapos.recipe.build:location}
$${slapos.recipe.cmmi:location}
$${slapos.recipe.template:location}
$${slapos.toolbox:location}
$${erp5-util:location}
$${caucase:location}
prepend-path = ${curl:location}/bin:${openssl:location}/bin:${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin
environment = environment
[environment]
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${python2.7:location}/lib -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${libxslt:location}/lib -Wl,-rpath=${zlib:location}/lib
LD_LIBRARY_PATH = ${python2.7:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libxslt:location}/lib:${zlib:location}/lib
PYTHONPATH = ${python-setuptools:pythonpath}:${buildout:eggs-directory}:${buildout:develop-eggs-directory}
LOCAL_IPV4 = $${slap-configuration:ipv4-random}
[sh-environment]
# Section exposes testing default environment as sh file. It is thus easy
# to directly develop and test the egg inside of this instance.
recipe = collective.recipe.template
input = inline:
export PATH="$${slapos-test-runner:prepend-path}:$PATH"
export CPPFLAGS="$${environment:CPPFLAGS}"
export LDFLAGS="$${environment:LDFLAGS}"
export PYTHONPATH="$${environment:PYTHONPATH}"
export PS1="[slapos-testing env Active] $PS1"
output = $${create-directory:bin}/environment.sh
mode = 755
interpreter = ${egg:interpreter}
[phantomjs-wrapper]
recipe = slapos.cookbook:wrapper
......
......@@ -12,20 +12,57 @@ extends =
../../component/phantomjs/buildout.cfg
../../component/pycurl/buildout.cfg
../../stack/slapos.cfg
./buildout.hash.cfg
parts =
caucase-repository
slapos.cookbook-repository
slapos.core-repository
slapos.recipe.template-repository
slapos.recipe.build-repository
slapos.recipe.cmmi-repository
slapos.toolbox-repository
erp5-util-repository
eggs
phantomjs
template
[setup-develop-egg]
recipe = zc.recipe.egg:develop
[caucase-setup]
<= setup-develop-egg
egg = caucase
setup = ${caucase:location}
[erp5.util-setup]
<= setup-develop-egg
egg = erp5.util
setup = ${erp5.util:location}
[slapos.cookbook-setup]
<= setup-develop-egg
egg = slapos.cookbook
setup = ${slapos.cookbook:location}
[slapos.core-setup]
<= setup-develop-egg
egg = slapos.core
setup = ${slapos.core:location}
[slapos.recipe.build-setup]
<= setup-develop-egg
egg = slapos.recipe.build
setup = ${slapos.recipe.build:location}
[slapos.recipe.cmmi-setup]
<= setup-develop-egg
egg = slapos.recipe.cmmi
setup = ${slapos.recipe.cmmi:location}
[slapos.recipe.template-setup]
<= setup-develop-egg
egg = slapos.recipe.template
setup = ${slapos.recipe.template:location}
[slapos.toolbox-setup]
<= setup-develop-egg
egg = slapos.toolbox
setup = ${slapos.toolbox:location}
[eggs]
recipe = zc.recipe.egg
eggs =
......@@ -35,18 +72,20 @@ eggs =
${bcrypt:egg}
dnspython
Jinja2
caucase
erp5.util
slapos.cookbook
collective.recipe.template
plone.recipe.command
slapos.recipe.template
slapos.recipe.cmmi
slapos.toolbox
${caucase-setup:egg}
${erp5.util-setup:egg}
${slapos.cookbook-setup:egg}
${slapos.core-setup:egg}
${slapos.recipe.build-setup:egg}
${slapos.recipe.cmmi-setup:egg}
${slapos.recipe.template-setup:egg}
${slapos.toolbox-setup:egg}
entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite
scripts =
runTestSuite
interpreter=
python_for_test
[git-clone-repository]
recipe = slapos.recipe.build:gitclone
......@@ -54,47 +93,44 @@ git-executable = ${git:location}/bin/git
forbid-download-cache = true
branch = master
[caucase-repository]
[caucase]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/caucase.git
[slapos.cookbook-repository]
[erp5.util]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/erp5.git
[slapos.cookbook]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.git
[slapos.core-repository]
[slapos.core]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git
[slapos.recipe.template-repository]
[slapos.recipe.template]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.template.git
[slapos.recipe.build-repository]
[slapos.recipe.build]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.build.git
[slapos.recipe.cmmi-repository]
[slapos.recipe.cmmi]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.cmmi.git
[slapos.toolbox-repository]
[slapos.toolbox]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.toolbox.git
[erp5-util-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/erp5.git
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 63253c24c5c09716a37f457f2a6b3b23
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 640
[versions]
Pygments = 2.1.3
collective.recipe.template = 1.10
plone.recipe.command = 1.1
slapos.recipe.template = 4.3
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