testing: start to test slapos.cookbook egg.
[slapos.git] / software / slapos-testing / instance.cfg
1 [buildout]
2 parts =
3   slapos.core-setup
4   erp5.util-setup
5   phantomjs-wrapper
6   slapos-test-runner
7   sh-environment
8
9 eggs-directory = ${buildout:eggs-directory}
10 develop-eggs-directory = ${buildout:develop-eggs-directory}
11 offline = true
12
13 [slap-configuration]
14 recipe = slapos.cookbook:slapconfiguration
15 computer = $${slap-connection:computer-id}
16 partition = $${slap-connection:partition-id}
17 url = $${slap-connection:server-url}
18 key = $${slap-connection:key-file}
19 cert = $${slap-connection:cert-file}
20
21 [create-directory]
22 recipe = slapos.cookbook:mkdirectory
23 bin = $${buildout:directory}/bin
24 etc = $${buildout:directory}/etc
25 services = $${:etc}/run
26 srv = $${buildout:directory}/srv
27 source-code = $${:srv}/eggs-source-code
28
29 [download-source]
30 recipe = slapos.recipe.build:gitclone
31 git-executable = ${git:location}/bin/git
32
33 # Local development
34 [slapos.core]
35 <= download-source
36 repository = ${slapos.core-repository:location}
37
38 [slapos.core-setup]
39 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 update-command = $${:command}
42
43 [slapos.package]
44 <= download-source
45 repository = ${slapos.package-repository:location}
46
47 [slapos.cookbook]
48 <= download-source
49 repository = ${slapos.cookbook-repository:location}
50
51 [slapos.recipe.template]
52 <= download-source
53 repository = ${slapos.recipe.template-repository:location}
54
55 [slapos.recipe.build]
56 <= download-source
57 repository = ${slapos.recipe.build-repository:location}
58
59 [slapos.recipe.cmmi]
60 <= download-source
61 repository = ${slapos.recipe.cmmi-repository:location}
62
63 [erp5-util]
64 <= download-source
65 repository = ${erp5-util-repository:location}
66
67 [erp5.util-setup]
68 recipe = plone.recipe.command
69 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 
70 update-command = $${:command}
71
72 [officejs]
73 <= download-source
74 repository = ${officejs-repository:location}
75
76 [jio]
77 <= download-source
78 repository = ${jio-repository:location}
79
80 [slapos-test-runner]
81 recipe = slapos.cookbook:egg_test
82 run-test-suite = $${create-directory:bin}/runTestSuite
83 run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
84 # The list of executables should be defined here and a combination
85 # of tests should dynamically generated.
86 #python-list = $${}
87 test-list =
88   $${slapos.cookbook:location}
89   $${slapos.core:location}
90   $${slapos.package:location}
91   $${slapos.recipe.template:location}
92   $${slapos.recipe.build:location}
93   $${slapos.recipe.cmmi:location}
94   $${erp5-util:location}
95   $${jio:location}
96   $${officejs:location}
97 prepend-path = ${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin
98 environment = environment
99
100 [environment]
101 CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
102 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
103 LD_LIBRARY_PATH = ${python2.7:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libxslt:location}/lib:${zlib:location}/lib
104 PYTHONPATH = ${python-setuptools:pythonpath}:${buildout:eggs-directory}
105 LOCAL_IPV4 = $${slap-configuration:ipv4-random}
106
107 [sh-environment]
108 # Section exposes testing default environment as sh file. It is thus easy
109 # to directly develop and test the egg inside of this instance.
110 recipe = collective.recipe.template
111 input = inline:
112   export PATH="$${slapos-test-runner:prepend-path}:$PATH"
113   export CPPFLAGS="$${environment:CPPFLAGS}"
114   export LDFLAGS="$${environment:LDFLAGS}"
115   export PYTHONPATH="$${environment:PYTHONPATH}"
116   export PS1="[slapos-testing env Active] $PS1"
117 output = $${create-directory:bin}/environment.sh
118 mode = 755
119
120 [phantomjs-wrapper]
121 recipe = slapos.cookbook:wrapper
122 command-line = ${phantomjs:location}/phantomjs-slapos
123 wrapper-path = $${create-directory:bin}/phantomjs
124 parameters-extra = true