instance.cfg 4.74 KB
Newer Older
1
[buildout]
2 3
parts =
  slapos.core-setup
4
  erp5.util-setup
5
  phantomjs-wrapper
6
  slapos-test-runner
7
  sh-environment
8 9 10 11 12

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

13 14 15 16 17 18 19 20
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}

21 22
[create-directory]
recipe = slapos.cookbook:mkdirectory
23
bin = $${buildout:directory}/bin
24 25 26 27
etc = $${buildout:directory}/etc
services = $${:etc}/run
srv = $${buildout:directory}/srv
source-code = $${:srv}/eggs-source-code
Rafael Monnerat's avatar
Rafael Monnerat committed
28

29 30 31
[download-source]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
Rafael Monnerat's avatar
Rafael Monnerat committed
32 33 34 35 36 37

# Local development
[slapos.core]
<= download-source
repository = ${slapos.core-repository:location}

38 39
[slapos.core-setup]
recipe = plone.recipe.command
40
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
41 42
update-command = $${:command}

43 44 45 46
[caucase]
<= download-source
repository = ${caucase-repository:location}

47 48 49 50
[slapos.cookbook]
<= download-source
repository = ${slapos.cookbook-repository:location}

Rafael Monnerat's avatar
Rafael Monnerat committed
51 52 53 54
[slapos.recipe.template]
<= download-source
repository = ${slapos.recipe.template-repository:location}

55 56 57 58
[slapos.recipe.build]
<= download-source
repository = ${slapos.recipe.build-repository:location}

59 60 61 62
[slapos.recipe.cmmi]
<= download-source
repository = ${slapos.recipe.cmmi-repository:location}

63 64 65 66
[slapos.toolbox]
<= download-source
repository = ${slapos.toolbox-repository:location}

67 68 69 70 71 72
[erp5-util]
<= download-source
repository = ${erp5-util-repository:location}

[erp5.util-setup]
recipe = plone.recipe.command
73
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
74 75
update-command = $${:command}

76
[slapos-test-runner]
Rafael Monnerat's avatar
Rafael Monnerat committed
77
recipe = slapos.cookbook:egg_test
78
run-test-suite = $${create-directory:bin}/runTestSuite
Rafael Monnerat's avatar
Rafael Monnerat committed
79 80 81 82
run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
# The list of executables should be defined here and a combination
# of tests should dynamically generated.
#python-list = $${}
83
test-list =
84
  $${slapos.cookbook:location}
85 86 87
  $${slapos.core:location}
  $${slapos.recipe.template:location}
  $${slapos.recipe.build:location}
88
  $${slapos.recipe.cmmi:location}
89
  $${slapos.toolbox:location}
90
  $${erp5-util:location}
91
  $${caucase:location}
92
prepend-path = ${curl:location}/bin:${openssl:location}/bin:${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin
93 94 95 96
environment = environment

[environment]
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
97
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
98
LD_LIBRARY_PATH = ${python2.7:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libxslt:location}/lib:${zlib:location}/lib
99
PYTHONPATH = ${python-setuptools:pythonpath}:${buildout:eggs-directory}:${buildout:develop-eggs-directory}
100
LOCAL_IPV4 = $${slap-configuration:ipv4-random}
101 102 103 104 105 106 107 108 109 110 111 112

[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
Cédric de Saint Martin's avatar
Cédric de Saint Martin committed
113
mode = 755
114 115 116 117

[phantomjs-wrapper]
recipe = slapos.cookbook:wrapper
command-line = ${phantomjs:location}/phantomjs-slapos
118
wrapper-path = $${create-directory:bin}/phantomjs
119
parameters-extra = true