forked from 4teamwork/ftw-buildouts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-robot.cfg
47 lines (38 loc) · 1.15 KB
/
test-robot.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Adds a bin/act_server script for running a acceptance testing server,
# so that the tests can be run seperately with bin/pybot.
[buildout]
parts +=
pybot
act_server
# Set this to a dotted name of a testing layer, which
# will be used as default.
testing_layer =
[pybot]
recipe = zc.recipe.egg
eggs =
plone.act
robotentrypoints
${buildout:test-egg}
scripts = pybot
initialization =
import subprocess, os, sys
os.chdir("${buildout:directory}")
pkgdir = subprocess.Popen(
'${buildout:directory}/bin/package-directory relative',
shell=True, stdout=subprocess.PIPE).stdout.read().strip()
# create output directory
output_directory = '${buildout:directory}/parts/test-pybot'
os.system('mkdir -p %s' % output_directory)
sys.argv.extend(['--outputdir', output_directory, pkgdir])
[act_server]
<= pybot
scripts = act_server
initialization =
import sys
layer = "${buildout:testing_layer}".strip()
if len(sys.argv) == 1 and layer: sys.argv.append(layer)
import os
os.environ['zope_i18n_compile_mo_files'] = 'true'
[test]
initialization +=
os.environ['zope_i18n_compile_mo_files'] = 'true'