[slapos-testing] Pre-setup slapos.core before run tests
[slapos.git] / software / slapos-testing / instance.cfg
1 [buildout]
2 parts =
3   slapos.core-setup
4   slapos-test-runner
5   sh-environment
6
7 eggs-directory = ${buildout:eggs-directory}
8 develop-eggs-directory = ${buildout:develop-eggs-directory}
9 offline = true
10
11 [create-directory]
12 recipe = slapos.cookbook:mkdirectory
13 bin = $${buildout:directory}/bin
14 etc = $${buildout:directory}/etc
15 services = $${:etc}/run
16 srv = $${buildout:directory}/srv
17 source-code = $${:srv}/eggs-source-code
18
19 [download-source]
20 recipe = slapos.recipe.build:gitclone
21 git-executable = ${git:location}/bin/git
22
23 # Local development
24 [slapos.core]
25 <= download-source
26 repository = ${slapos.core-repository:location}
27
28 [slapos.core-setup]
29 recipe = plone.recipe.command
30 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}"; python setup.py test -n; python setup.py test -n; python setup.py test -n; python setup.py test -n 
31 update-command = $${:command}
32
33
34 [slapos.recipe.template]
35 <= download-source
36 repository = ${slapos.recipe.template-repository:location}
37
38 [slapos.recipe.build]
39 <= download-source
40 repository = ${slapos.recipe.build-repository:location}
41
42 [slapos-test-runner]
43 recipe = slapos.cookbook:egg_test
44 run-test-suite = $${create-directory:bin}/runTestSuite
45 run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
46 # The list of executables should be defined here and a combination
47 # of tests should dynamically generated.
48 #python-list = $${}
49 test-list =
50   $${slapos.core:location}
51   $${slapos.recipe.template:location}
52   $${slapos.recipe.build:location}
53 prepend-path = ${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin
54 environment = environment
55
56 [environment]
57 CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
58 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
59 LD_LIBRARY_PATH = ${python2.7:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libxslt:location}/lib:${zlib:location}/lib
60 PYTHONPATH = ${python-setuptools:pythonpath}
61
62 [sh-environment]
63 # Section exposes testing default environment as sh file. It is thus easy
64 # to directly develop and test the egg inside of this instance.
65 recipe = collective.recipe.template
66 input = inline:
67   export PATH="$${slapos-test-runner:prepend-path}:$PATH"
68   export CPPFLAGS="$${environment:CPPFLAGS}"
69   export LDFLAGS="$${environment:LDFLAGS}"
70   export PYTHONPATH="$${environment:PYTHONPATH}"
71   export PS1="[slapos-testing env Active] $PS1"
72 output = $${create-directory:bin}/environment.sh
73 mode = 755