Commit 13033c87 authored by Julien Muchembled's avatar Julien Muchembled

fixup! buildout: add profile to test with Python 3

parent 4725ec94
Pipeline #9493 failed with stage
in 0 seconds
...@@ -6,6 +6,11 @@ from erp5.util import taskdistribution ...@@ -6,6 +6,11 @@ from erp5.util import taskdistribution
from erp5.util.testsuite import SubprocessError, TestSuite from erp5.util.testsuite import SubprocessError, TestSuite
from zc.buildout.buildout import Buildout from zc.buildout.buildout import Buildout
if str is bytes:
str2bytes = lambda s: s
else:
str2bytes = lambda s: s.encode()
slapos_buildout = {{repr(slapos_buildout)}} slapos_buildout = {{repr(slapos_buildout)}}
test_dict = { test_dict = {
'zc.buildout': slapos_buildout, 'zc.buildout': slapos_buildout,
...@@ -90,7 +95,7 @@ def main(): ...@@ -90,7 +95,7 @@ def main():
fd = os.open('buildout.cfg', os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0666) fd = os.open('buildout.cfg', os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0666)
try: try:
os.write(fd, """\ os.write(fd, str2bytes("""\
[buildout] [buildout]
extends = %s extends = %s
develop =%s develop =%s
...@@ -112,7 +117,7 @@ scripts = ...@@ -112,7 +117,7 @@ scripts =
zope-testrunner zope-testrunner
""" % (os.path.join(slapos_buildout, 'buildout.cfg'), """ % (os.path.join(slapos_buildout, 'buildout.cfg'),
''.join('\n ' + x for x in test_dict.itervalues()), ''.join('\n ' + x for x in test_dict.itervalues()),
'\n'.join(x + ' =' for x in test_dict))) '\n'.join(x + ' =' for x in test_dict))))
finally: finally:
os.close(fd) os.close(fd)
Buildout('buildout.cfg', {}).install(['bootstrap']) Buildout('buildout.cfg', {}).install(['bootstrap'])
......
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