...
 
Commits (37)
[buildout]
extends =
../python3/buildout.cfg
../gcc/buildout.cfg
[buildout]
parts =
cypclass_websocket_demo
[cypclass_websocket_demo_source]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/gsamain/websocket_demo.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
branch = mongoose_demo_acthon
[cypclass_websocket_demo]
recipe = plone.recipe.command
stop-on-error = true
update-command = true
location = ${cypclass_websocket_demo_source:location}
python3-binary = ${python3.5:location}/bin/python3
command = (PATH=${gcc:location}:$PATH && cd ${cypclass_websocket_demo_source:location} && ${:python3-binary} setup.py build_ext install)
[buildout]
extends =
../python3/buildout.cfg
../gcc/buildout.cfg
[buildout]
parts =
cython_lwan_coro
[cython_lwan_coro_source]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/gsamain/cython_lwan_coro.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
branch = cython_cypclass
[cython_lwan_coro]
recipe = plone.recipe.command
stop-on-error = true
update-command = true
location = ${cython_lwan_coro_source:location}
python3-binary = ${python3.5:location}/bin/python3
command = (PATH=${gcc:location}:$PATH && cd ${cython_lwan_coro_source:location} && ${:python3-binary} setup.py build_ext install)
[buildout]
extends =
../python3/buildout.cfg
../gcc/buildout.cfg
[buildout]
parts =
cython_nogil
[cython]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/gsamain/cython.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
branch = nogil_cypclass_acthon_on_rc8v3
[cython_nogil]
recipe = plone.recipe.command
stop-on-error = true
update-command = true
location = ${cython:location}
python3-binary = ${python3.5:location}/bin/python3
command = (PATH=${gcc:location}:$PATH && cd ${cython:location} && ${:python3-binary} setup.py install && cd ${cython:location}/nogil_test && ${:python3-binary} nogil_extension_test.py build_ext install)
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance]
filename = instance.cfg.in
md5sum = a061d2e923270afe0f12e3d07d72f8d3
[template-runTestSuite]
filename = runTestSuite.in
md5sum = 64fb4f4c529a88cde3bb31719f3fbecf
[buildout]
parts =
runTestSuite-instance
launchTestSuite-instance
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = false
[directory]
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
#################################
# Test runner
#################################
[runTestSuite-instance]
recipe = slapos.recipe.template
url = ${template-runTestSuite:output}
output = $${directory:bin}/runTestSuite
buildout-directory = $${buildout:directory}
mode = 0700
[launchTestSuite-instance]
recipe = plone.recipe.command
stop-on-error = true
update-command = true
command = (${cython_nogil:python3-binary} $${directory:bin}/runTestSuite)
#!${buildout:directory}/bin/${eggs:interpreter}
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
"""
Script to run Cython test suite using Nexedi's test node framework.
"""
import os, subprocess, sys, traceback
from time import gmtime, strftime
import datetime
def main():
is_browser_running = False
try:
date = strftime("%Y/%m/%d %H:%M:%S", gmtime())
###########################
# Run Cython's test suite #
###########################
# We need to screw up the working directory because Cython's runtests script relies on it
os.chdir("${cython_nogil:location}")
path_var = os.pathsep.join([os.environ.get('PATH', os.defpath), '${python3.5:location}/bin/python3/bin/'])
env = dict(os.environ, PATH=path_var)
python_path = '${python3.5:location}/bin/python3'
print("Setup is:")
print("python_path=", python_path)
print("test location: ${cython_nogil:location}/runtests.py")
start_time = datetime.datetime.now()
print("Starting at", start_time)
result = subprocess.run([python_path + " runtests.py"],
env=env,
shell=True,
)
end_time = datetime.datetime.now()
duration = (end_time - start_time).total_seconds()
print("Ending at", end_time, " (duration: %s seconds)" % duration)
return result.returncode
except:
# Catch any exception here, to warn user instead of being silent,
# by generating fake error result
print(traceback.format_exc())
result = dict(status_code=-1,
command='python3 -c "import test"', # url
stderr=traceback.format_exc(),
stdout='')
# XXX: inform test node master of error
raise EnvironmentError(result)
if __name__ == "__main__":
main()
[buildout]
extends =
../../stack/slapos.cfg
../../component/git/buildout.cfg
../../component/cython_nogil/buildout.cfg
../../component/cython_lwan_coro/buildout.cfg
./buildout.hash.cfg
parts =
slapos-cookbook
git
instance
cython_nogil
cython_lwan_coro
template-runTestSuite
[eggs]
recipe = zc.recipe.egg
eggs =
erp5.util
interpreter = pythonwitheggs
[macro-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
mode = 0644
[instance]
<= macro-template
output = ${buildout:directory}/instance.cfg
[template-runTestSuite]
<= macro-template
output = ${buildout:directory}/runTestSuite.in
[versions]
slapos.recipe.template = 4.3
\ No newline at end of file
......@@ -197,7 +197,7 @@ def main():
# by generating fake error result
print traceback.format_exc()
result = dict(status_code=-1,
command=url,
command='python3 -c "import test"', # url
stderr=traceback.format_exc(),
stdout='')
# XXX: inform test node master of error
......