Commit 648c6893 authored by Boxiang Sun's avatar Boxiang Sun Committed by gsamain

Build Cython nogil extension right after the Cython build

parent fb69d855
...@@ -15,4 +15,4 @@ repository = https://lab.nexedi.com/Daetalus/cython.git ...@@ -15,4 +15,4 @@ repository = https://lab.nexedi.com/Daetalus/cython.git
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
git-binary = ${git:location}/bin/git git-binary = ${git:location}/bin/git
python3-binary = ${python3.5:location}/bin/python3 python3-binary = ${python3.5:location}/bin/python3
command = (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} checkout nogil_extension && ${:python3-binary} setup.py install) command = (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} checkout nogil_extension && ${:python3-binary} setup.py install && ${:python3-binary} test.py build_ext --inplace)
\ No newline at end of file \ No newline at end of file
...@@ -19,4 +19,4 @@ md5sum = a040b6e2323571de98606f5724246831 ...@@ -19,4 +19,4 @@ md5sum = a040b6e2323571de98606f5724246831
[template-runTestSuite] [template-runTestSuite]
filename = runTestSuite.in filename = runTestSuite.in
md5sum = dd91f4f08a08f7d3e42857e4a85841f6 md5sum = 29ed45638baec61ae623f2c65eedc162
...@@ -44,14 +44,11 @@ def main(): ...@@ -44,14 +44,11 @@ def main():
# run 'python3 -c 'import test'' # run 'python3 -c 'import test''
# passed if we get 'done' # passed if we get 'done'
# ${python3.5:location}/bin/python3 # ${python3.5:location}/bin/python3
result_string = subprocess.check_output(['${python3.5:location}/bin/python3', 'test.py', 'build_ext', '--inplace'],
cwd='${cython_nogil:location}',
env={'CI': 'true'})
result_string = check_output(['${python3.5:location}/bin/python3 -c "import test"'], result_string = check_output(['${python3.5:location}/bin/python3 -c "import test"'],
shell=True, shell=True,
cwd='${cython_nogil:location}', cwd='${cython_nogil:location}',
env={'CI': 'true'}) env={'CI': 'true'})
result_dict = json.loads(result_string) # result_dict = json.loads(result_string)
result_failed = 0 if 'done' in result_string else 1 result_failed = 0 if 'done' in result_string else 1
# for result in result_dict['tests']: # for result in result_dict['tests']:
test_line_dict['%s: %s' % ('Cython test', 'basic test')] = { test_line_dict['%s: %s' % ('Cython test', 'basic test')] = {
...@@ -83,6 +80,7 @@ def main(): ...@@ -83,6 +80,7 @@ def main():
break break
print 'Submitting: "%s"' % test_result_line.name print 'Submitting: "%s"' % test_result_line.name
print test_line_dict['Cython test: basic test']
# report status back to Nexedi ERP5 # report status back to Nexedi ERP5
test_result_line.stop(**test_line_dict[test_result_line.name]) test_result_line.stop(**test_line_dict[test_result_line.name])
......
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