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] [buildout]
parts = parts =
slapos.core-setup
erp5.util-setup
phantomjs-wrapper phantomjs-wrapper
slapos-test-runner slapos-test-runner
sh-environment
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -24,54 +21,6 @@ bin = $${buildout:directory}/bin ...@@ -24,54 +21,6 @@ bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc etc = $${buildout:directory}/etc
services = $${:etc}/run services = $${:etc}/run
srv = $${buildout:directory}/srv 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] [slapos-test-runner]
recipe = slapos.cookbook:egg_test recipe = slapos.cookbook:egg_test
...@@ -81,36 +30,16 @@ run-test-suite-binary = ${buildout:bin-directory}/runTestSuite ...@@ -81,36 +30,16 @@ run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
# of tests should dynamically generated. # of tests should dynamically generated.
#python-list = $${} #python-list = $${}
test-list = test-list =
$${caucase:location}
$${erp5.util:location}
$${slapos.cookbook:location} $${slapos.cookbook:location}
$${slapos.core:location} $${slapos.core:location}
$${slapos.recipe.template:location}
$${slapos.recipe.build:location} $${slapos.recipe.build:location}
$${slapos.recipe.cmmi:location} $${slapos.recipe.cmmi:location}
$${slapos.recipe.template:location}
$${slapos.toolbox: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 prepend-path = ${curl:location}/bin:${openssl:location}/bin:${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin
environment = environment interpreter = ${egg:interpreter}
[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
[phantomjs-wrapper] [phantomjs-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
......
...@@ -12,20 +12,57 @@ extends = ...@@ -12,20 +12,57 @@ extends =
../../component/phantomjs/buildout.cfg ../../component/phantomjs/buildout.cfg
../../component/pycurl/buildout.cfg ../../component/pycurl/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
./buildout.hash.cfg
parts = 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 eggs
phantomjs phantomjs
template 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] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
...@@ -35,18 +72,20 @@ eggs = ...@@ -35,18 +72,20 @@ eggs =
${bcrypt:egg} ${bcrypt:egg}
dnspython dnspython
Jinja2 Jinja2
caucase ${caucase-setup:egg}
erp5.util ${erp5.util-setup:egg}
slapos.cookbook ${slapos.cookbook-setup:egg}
collective.recipe.template ${slapos.core-setup:egg}
plone.recipe.command ${slapos.recipe.build-setup:egg}
slapos.recipe.template ${slapos.recipe.cmmi-setup:egg}
slapos.recipe.cmmi ${slapos.recipe.template-setup:egg}
slapos.toolbox ${slapos.toolbox-setup:egg}
entry-points = entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite runTestSuite=erp5.util.testsuite:runTestSuite
scripts = scripts =
runTestSuite runTestSuite
interpreter=
python_for_test
[git-clone-repository] [git-clone-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -54,47 +93,44 @@ git-executable = ${git:location}/bin/git ...@@ -54,47 +93,44 @@ git-executable = ${git:location}/bin/git
forbid-download-cache = true forbid-download-cache = true
branch = master branch = master
[caucase-repository] [caucase]
<= git-clone-repository <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/caucase.git 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 <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.git repository = https://lab.nexedi.com/nexedi/slapos.git
[slapos.core-repository] [slapos.core]
<= git-clone-repository <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git repository = https://lab.nexedi.com/nexedi/slapos.core.git
[slapos.recipe.template-repository] [slapos.recipe.template]
<= git-clone-repository <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.template.git repository = https://lab.nexedi.com/nexedi/slapos.recipe.template.git
[slapos.recipe.build-repository] [slapos.recipe.build]
<= git-clone-repository <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.build.git repository = https://lab.nexedi.com/nexedi/slapos.recipe.build.git
[slapos.recipe.cmmi-repository] [slapos.recipe.cmmi]
<= git-clone-repository <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.cmmi.git repository = https://lab.nexedi.com/nexedi/slapos.recipe.cmmi.git
[slapos.toolbox-repository] [slapos.toolbox]
<= git-clone-repository <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.toolbox.git repository = https://lab.nexedi.com/nexedi/slapos.toolbox.git
[erp5-util-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/erp5.git
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/${:filename}
md5sum = 63253c24c5c09716a37f457f2a6b3b23
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 640 mode = 640
[versions] [versions]
Pygments = 2.1.3 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