Commit 2d9fd069 authored by Ivan Tyagov's avatar Ivan Tyagov

X <instance>/bin/runTestSuite generation draftly works

parent 8f26141d
...@@ -41,3 +41,4 @@ extra-context = ...@@ -41,3 +41,4 @@ extra-context =
key admin_cfg neo-admin:rendered key admin_cfg neo-admin:rendered
raw mariadb_location {{ mariadb_location }} raw mariadb_location {{ mariadb_location }}
raw template_neo_my_cnf {{ template_neo_my_cnf }} raw template_neo_my_cnf {{ template_neo_my_cnf }}
raw runTestSuite_in {{ runTestSuite_in }}
...@@ -27,6 +27,17 @@ rendered = ${directory:etc}/mariadb.cnf ...@@ -27,6 +27,17 @@ rendered = ${directory:etc}/mariadb.cnf
template = {{ template_neo_my_cnf }} template = {{ template_neo_my_cnf }}
context = section parameter_dict my-cnf-parameters context = section parameter_dict my-cnf-parameters
# bin/runTestSuite to run NEO tests
[runTestSuite]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
rendered = ${directory:bin}/${:_buildout_section_name_}
template = {{ runTestSuite_in }}
mode = 0755
context =
section my_cnf_parameters my-cnf-parameters
{% set master_list = [] -%} {% set master_list = [] -%}
{% set admin_list = [] -%} {% set admin_list = [] -%}
{% for k, v in slapparameter_dict.iteritems() -%} {% for k, v in slapparameter_dict.iteritems() -%}
...@@ -146,3 +157,4 @@ extends = ...@@ -146,3 +157,4 @@ extends =
parts += parts +=
{{ '\n '.join(part_list) }} {{ '\n '.join(part_list) }}
logrotate-mysql logrotate-mysql
runTestSuite
#!/bin/bash #!/bin/bash
echo "Works?" echo "WorkS3333332?"
export MYSQL_UNIX_PORT={{ my_cnf_parameters.socket }}
...@@ -76,7 +76,7 @@ mode = 644 ...@@ -76,7 +76,7 @@ mode = 644
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in template = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in
rendered = ${buildout:directory}/${:_buildout_section_name_}.cfg rendered = ${buildout:directory}/${:_buildout_section_name_}.cfg
md5sum = e8f5a83580e9791a32c66f5935cb6840 #md5sum = e8f5a83580e9791a32c66f5935cb6840
context = context =
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -87,6 +87,7 @@ context = ...@@ -87,6 +87,7 @@ context =
key neo_storage_mysql instance-neo-storage-mysql:target key neo_storage_mysql instance-neo-storage-mysql:target
key template_logrotate_base template-logrotate-base:rendered key template_logrotate_base template-logrotate-base:rendered
key template_neo_my_cnf template-neo-my-cnf:target key template_neo_my_cnf template-neo-my-cnf:target
key runTestSuite_in runTestSuite.in:target
[root-common] [root-common]
<= download-base-neo <= download-base-neo
...@@ -102,7 +103,7 @@ md5sum = 82f3f76f54ee9db355966a7ada61f56e ...@@ -102,7 +103,7 @@ md5sum = 82f3f76f54ee9db355966a7ada61f56e
[instance-neo-storage-mysql] [instance-neo-storage-mysql]
<= download-base-neo <= download-base-neo
md5sum = 84b1150ce30ec827485f9c17debd6b44 #md5sum = 84b1150ce30ec827485f9c17debd6b44
[template-neo-my-cnf] [template-neo-my-cnf]
<= download-base-neo <= download-base-neo
......
...@@ -4,13 +4,17 @@ extends = ...@@ -4,13 +4,17 @@ extends =
software.cfg software.cfg
parts + = parts + =
runTestSuite runTestSuite.in
[runTestSuite]
recipe = slapos.recipe.template:jinja2 # macro: download a file named as section name
template= ${:_profile_base_location_}/${:_buildout_section_name_}.in # XXX dup from software/gitlab/software.cfg
rendered= ${buildout:bin-directory}/${:_buildout_section_name_} [download-file]
mode = 0755 recipe = slapos.recipe.build:download
#md5sum = 2986dcb006dc9e8508ff81f646656131 url = ${:_profile_base_location_}/${:_buildout_section_name_}
#context = destination = ${buildout:directory}/${:_buildout_section_name_}
# section bash bash
[runTestSuite.in]
<= download-file
#md5sum = ... TODO
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