Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos
Commits
0d29de33
Commit
0d29de33
authored
Feb 15, 2023
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NEO: full support for PyPy & PyMySQL
parent
09b4430e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
35 deletions
+33
-35
software/neoppod/buildout.hash.cfg
software/neoppod/buildout.hash.cfg
+3
-3
software/neoppod/instance-common.cfg.in
software/neoppod/instance-common.cfg.in
+0
-3
software/neoppod/instance-neo-input-schema.json
software/neoppod/instance-neo-input-schema.json
+4
-0
software/neoppod/instance-neo.cfg.in
software/neoppod/instance-neo.cfg.in
+14
-10
software/neoppod/runTestSuite.in
software/neoppod/runTestSuite.in
+6
-15
software/neoppod/software-common.cfg
software/neoppod/software-common.cfg
+4
-1
software/neoppod/software-pypy.cfg
software/neoppod/software-pypy.cfg
+2
-3
No files found.
software/neoppod/buildout.hash.cfg
View file @
0d29de33
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# not need these here).
# not need these here).
[instance-common]
[instance-common]
filename = instance-common.cfg.in
filename = instance-common.cfg.in
md5sum =
402d09fbe2927f4f744ad6c0dc4329b
9
md5sum =
e000e7134113b9d1c63d40861eaf048
9
[root-common]
[root-common]
filename = root-common.cfg.in
filename = root-common.cfg.in
...
@@ -30,7 +30,7 @@ md5sum = 9f27195d770b2f57461c60a82c851ab9
...
@@ -30,7 +30,7 @@ md5sum = 9f27195d770b2f57461c60a82c851ab9
[instance-neo]
[instance-neo]
filename = instance-neo.cfg.in
filename = instance-neo.cfg.in
md5sum =
03a6c72619b02f5100fa7ccc8dc0e5ea
md5sum =
504b021715566e69ad664101f1b12a5c
[template-neo-my-cnf]
[template-neo-my-cnf]
filename = my.cnf.in
filename = my.cnf.in
...
@@ -46,4 +46,4 @@ md5sum = 5afd326de385563b5aeac81039f23341
...
@@ -46,4 +46,4 @@ md5sum = 5afd326de385563b5aeac81039f23341
[runTestSuite.in]
[runTestSuite.in]
_update_hash_filename_ = runTestSuite.in
_update_hash_filename_ = runTestSuite.in
md5sum =
4e7f5b5230800a65c71310a518225119
md5sum =
1e2126d02f54daaa624cefeea004c2da
software/neoppod/instance-common.cfg.in
View file @
0d29de33
...
@@ -48,6 +48,3 @@ extra-context =
...
@@ -48,6 +48,3 @@ extra-context =
raw template_mysqld_wrapper {{ template_mysqld_wrapper }}
raw template_mysqld_wrapper {{ template_mysqld_wrapper }}
raw template_neo_my_cnf {{ template_neo_my_cnf }}
raw template_neo_my_cnf {{ template_neo_my_cnf }}
{%- endif %}
{%- endif %}
{%- if pypy_location is defined %}
raw pypy_location {{ pypy_location }}
{%- endif %}
software/neoppod/instance-neo-input-schema.json
View file @
0d29de33
...
@@ -122,6 +122,10 @@
...
@@ -122,6 +122,10 @@
"description"
:
"Size of private tmpfs mount to store the database. See filesystems/tmpfs.txt in Linux documentation. Use only for testing."
,
"description"
:
"Size of private tmpfs mount to store the database. See filesystems/tmpfs.txt in Linux documentation. Use only for testing."
,
"type"
:
"string"
"type"
:
"string"
},
},
"test-binding-list"
:
{
"description"
:
"List of bindings to test when running the test suite."
,
"type"
:
"array"
},
"mysql"
:
{
"mysql"
:
{
"description"
:
"Dictionary containing parameters for MySQL."
,
"description"
:
"Dictionary containing parameters for MySQL."
,
"default"
:
{},
"default"
:
{},
...
...
software/neoppod/instance-neo.cfg.in
View file @
0d29de33
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
{% set private_tmpfs = slapparameter_dict.get('private-tmpfs') -%}
{% set private_tmpfs = slapparameter_dict.get('private-tmpfs') -%}
{% set storage_type = slapparameter_dict.get('storage-type') or (
{% set storage_type = slapparameter_dict.get('storage-type') or (
'MySQL' if mariadb_location is defined else 'SQLite') -%}
'MySQL' if mariadb_location is defined else 'SQLite') -%}
{% set mysql = storage_type
== 'MySQL
' -%}
{% set mysql = storage_type
!= 'SQLite
' -%}
{% if mysql -%}
{% if mysql -%}
[{{ section('mysqld') }}]
[{{ section('mysqld') }}]
...
@@ -167,6 +167,14 @@ post = ${binary-wrap-mysql:command-line} -e "FLUSH LOGS"
...
@@ -167,6 +167,14 @@ post = ${binary-wrap-mysql:command-line} -e "FLUSH LOGS"
{% if runTestSuite_in is defined -%}
{% if runTestSuite_in is defined -%}
# bin/runTestSuite to run NEO tests
# bin/runTestSuite to run NEO tests
[runTestSuite-parameters]
bin_directory = {{ bin_directory }}
prepend_path = {{ mariadb_location }}/bin
test_binding_list = {{ dumps(slapparameter_dict.get('test-binding-list', (
'MySQLdb', 'PyMySQL', 'SQLite',
))) }}
[{{ section('runTestSuite') }}]
[{{ section('runTestSuite') }}]
{%- if private_tmpfs %}
{%- if private_tmpfs %}
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
...
@@ -182,11 +190,7 @@ url = {{ runTestSuite_in }}
...
@@ -182,11 +190,7 @@ url = {{ runTestSuite_in }}
context =
context =
section directory directory
section directory directory
section my_cnf_parameters my-cnf-parameters
section my_cnf_parameters my-cnf-parameters
raw bin_directory {{ bin_directory }}
section parameters runTestSuite-parameters
raw prepend_path {{ mariadb_location }}/bin
{%- if pypy_location is defined %}
raw pypy_location {{ pypy_location }}/bin/pypy
{%- endif %}
{%- if private_tmpfs %}
{%- if private_tmpfs %}
key datadir my-cnf-parameters:data-directory
key datadir my-cnf-parameters:data-directory
key results_directory directory:results
key results_directory directory:results
...
...
software/neoppod/runTestSuite.in
View file @
0d29de33
#!{{ bin_directory }}/runTestSuite_py
#!{{
parameters.
bin_directory }}/runTestSuite_py
"""
"""
Script to run NEO test suite using Nexedi's test node framework.
Script to run NEO test suite using Nexedi's test node framework.
"""
"""
...
@@ -13,12 +13,12 @@ SUMMARY_RE = re.compile(
...
@@ -13,12 +13,12 @@ SUMMARY_RE = re.compile(
r' (.*) (?P<duration>\d+(\.\d*)?|\.\d+)s', re.MULTILINE)
r' (.*) (?P<duration>\d+(\.\d*)?|\.\d+)s', re.MULTILINE)
PATH = os.environ['PATH']
PATH = os.environ['PATH']
PATH = {{ repr(prepend_path) }} + (PATH and ':' + PATH)
PATH = {{ repr(p
arameters.p
repend_path) }} + (PATH and ':' + PATH)
# NEO specific environment
# NEO specific environment
TEMP_DIRECTORY = {{ repr(directory.tmp) }}
TEMP_DIRECTORY = {{ repr(directory.tmp) }}
NEO_DB_SOCKET = {{ repr(my_cnf_parameters.socket) }}
NEO_DB_SOCKET = {{ repr(my_cnf_parameters.socket) }}
RUN_NEO_TESTS_COMMAND = {{ repr(bin_directory + '/neotestrunner') }}
RUN_NEO_TESTS_COMMAND = {{ repr(
parameters.
bin_directory + '/neotestrunner') }}
def parseTestStdOut(data):
def parseTestStdOut(data):
"""
"""
...
@@ -90,7 +90,7 @@ def main():
...
@@ -90,7 +90,7 @@ def main():
test_suite_title = args.test_suite_title or args.test_suite
test_suite_title = args.test_suite_title or args.test_suite
test_name_list =
'SQLite', 'MySQL'
test_name_list =
{{ repr(parameters.test_binding_list) }}
if args.master_url:
if args.master_url:
tool = taskdistribution.TaskDistributor(portal_url = args.master_url)
tool = taskdistribution.TaskDistributor(portal_url = args.master_url)
...
@@ -115,24 +115,15 @@ def main():
...
@@ -115,24 +115,15 @@ def main():
shutil.rmtree(temp)
shutil.rmtree(temp)
os.mkdir(temp)
os.mkdir(temp)
args = [RUN_NEO_TESTS_COMMAND,
args = [RUN_NEO_TESTS_COMMAND, '-ufz']
{%- if pypy_location is defined -%}
'-fz'
{%- else -%}
'-ufz'
{%- endif -%}
]
command = ' '.join(args)
command = ' '.join(args)
env = {'PATH': PATH,
env = {'PATH': PATH,
'TEMP': temp,
'TEMP': temp,
{%- if pypy_location is defined %}
'NEO_PYPY': {{ repr(pypy_location) }},
{%- endif %}
'NEO_TESTS_ADAPTER': adapter,
'NEO_TESTS_ADAPTER': adapter,
'NEO_TEST_ZODB_FUNCTIONAL': '1',
'NEO_TEST_ZODB_FUNCTIONAL': '1',
'NEO_DB_USER': 'root'}
'NEO_DB_USER': 'root'}
try:
try:
if adapter
== 'MySQL
':
if adapter
!= 'SQLite
':
env['NEO_DB_SOCKET'] = NEO_DB_SOCKET
env['NEO_DB_SOCKET'] = NEO_DB_SOCKET
timeout = time() + 60
timeout = time() + 60
while not os.path.exists(NEO_DB_SOCKET):
while not os.path.exists(NEO_DB_SOCKET):
...
...
software/neoppod/software-common.cfg
View file @
0d29de33
...
@@ -57,7 +57,9 @@ eggs = neoppod[admin, ctl, master]
...
@@ -57,7 +57,9 @@ eggs = neoppod[admin, ctl, master]
zope.testing
zope.testing
coverage
coverage
setproctitle
setproctitle
adapter-egg = ${python-mysqlclient:egg}
adapter-egg =
${python-mysqlclient:egg}
PyMySQL
[download-base-neo]
[download-base-neo]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
...
@@ -128,6 +130,7 @@ inline =
...
@@ -128,6 +130,7 @@ inline =
coverage = 5.5
coverage = 5.5
ecdsa = 0.13
ecdsa = 0.13
mysqlclient = 1.3.12
mysqlclient = 1.3.12
PyMySQL = 0.10.1
pycrypto = 2.6.1
pycrypto = 2.6.1
cython-zstd = 0.2
cython-zstd = 0.2
funcsigs = 1.0.2
funcsigs = 1.0.2
software/neoppod/software-pypy.cfg
View file @
0d29de33
...
@@ -3,6 +3,5 @@ extends =
...
@@ -3,6 +3,5 @@ extends =
../../component/pypy/buildout.cfg
../../component/pypy/buildout.cfg
software.cfg
software.cfg
[instance-common]
[python]
context +=
part = pypy2
key pypy_location pypy2:location
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment