Commit 64e07b29 authored by Rafael Monnerat's avatar Rafael Monnerat

Improve slapos-testing

parent 45e12570
...@@ -99,13 +99,13 @@ class CloudoooRecipe(GenericBaseRecipe): ...@@ -99,13 +99,13 @@ class CloudoooRecipe(GenericBaseRecipe):
return path_list return path_list
class SlapUnitTestRecipe(GenericBaseRecipe): class EggTestRecipe(GenericBaseRecipe):
def install(self): def install(self):
path_list = [] path_list = []
common_dict = dict( common_dict = dict(
prepend_path=self.options['prepend-path'], prepend_path=self.options['prepend-path'],
) )
common_list = [] common_list = [ "--source-core-path-list", self.options['test-list']]
path_list.append(run_unit_test_path) path_list.append(run_unit_test_path)
path_list.append(self.createPythonScript(self.options['run-test-suite'], path_list.append(self.createPythonScript(self.options['run-test-suite'],
__name__ + '.test.runTestSuite', [dict( __name__ + '.test.runTestSuite', [dict(
......
...@@ -6,19 +6,41 @@ eggs-directory = ${buildout:eggs-directory} ...@@ -6,19 +6,41 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[download-source]
recipe = plone.recipe.command
location = $${rootdirectory:source-code}/${:_buildout_section_name_}
stop-on-error = true
branch = master
revision =
command = "${git:location}/bin/git" clone --quiet --branch "$${:branch}" "$${:repository}" "$${:location}" && if [ -n "$${:revision}" ]; then cd "$${:location}" && "${git:location}/bin/git" reset --quiet --hard "$${:revision}" ; fi
update-command = cd "$${:location}" && "${git:location}/bin/git" fetch && if [ -n "$${:revision}" ]; then "${git:location}/bin/git" reset --hard "$${:revision}"; else "${git:location}/bin/git" reset --hard @{upstream} ; fi
# Local development
[slapos.core]
<= download-source
repository = ${slapos.core-repository:location}
[slapos.recipe.template]
<= download-source
repository = ${slapos.recipe.template-repository:location}
[slapos-test-runner] [slapos-test-runner]
recipe = slapos.cookbook:slapuser.test recipe = slapos.cookbook:egg_test
run-test-suite = $${buildout:bin-directory}/runTestSuite
run-unit-test = ${buildout:bin-directory}/runUnitTest run-test-suite-binary = ${buildout:bin-directory}/runTestSuite
run-test-suite = ${buildout:bin-directory}/runTestSuite
configuration-file = ${cloudooo-instance:configuration-file} # The list of executables should be defined here and a combination
# of tests should dynamically generated.
#python-list = $${}
run-unit-test-binary = test-list = $${slapos.recipe.template:location},$${slapos.core:location}
run-test-suite-binary =
[rootdirectory] [rootdirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc etc = ${buildout:directory}/etc
srv = ${buildout:directory}/srv srv = ${buildout:directory}/srv
source-code = $${:srv}/eggs-source-code
bin = ${buildout:directory}/bin bin = ${buildout:directory}/bin
[buildout] [buildout]
extends = extends = ../../stack/slapos.cfg
../../component/slapos/buildout.cfg
../../component/git/buildout.cfg ../../component/git/buildout.cfg
develop = parts = runTestSuite
${:parts-directory}/slapos.core-repository slapos.core-repository
slapos.recipe.template-repository
template
parts += slapos.core-repository develop = ${buildout:parts-directory}/parts/erp5.util-repository
check-recipe ${buildout:parts-directory}/parts/erp5.cookbook-repository
runTestSuite
[erp5.util-repository]
<= download-source
repository = http://git.erp5.org/repos/erp5.git
branch = for_test_runner_1
[erp5.cookbook-repository]
<= download-source
repository = http://git.erp5.org/repos/slapos.git
branch = slapos-testing
[runTestSuite] [runTestSuite]
recipe = recipe = zc.recipe.egg
zc.recipe.testrunner
eggs = eggs =
slapos.core erp5.util
# slapos.core do not use python convention to find the entry-points =
# tests. runTestSuite=erp5.util.testsuite:runTestSuite
defaults = ['--tests-pattern', '$', '-v']
# Local development scripts =
[slapos.core-repository] runTestSuite
recipe = plone.recipe.command
stop-on-error = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.core.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
[check-recipe] [download-source]
recipe = plone.recipe.command recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true stop-on-error = true
update-command = ${:command} branch = master
command = grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link revision =
command = "${git:location}/bin/git" clone --quiet --branch "${:branch}" "${:repository}" "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi
update-command = cd "${:location}" && "${git:location}/bin/git" fetch && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --hard @{upstream} ; fi
[slapos.core-repository]
<= download-source
repository = http://git.erp5.org/repos/slapos.core.git
[slapos.recipe.template-repository]
<= download-source
repository = http://git.erp5.org/repos/slapos.recipe.template.git
[template] [template]
recipe = slapos.recipe.build:download recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
md5sum = md5sum = 1382838589e31ebfcba4420d9c7d42d9
output = ${buildout:directory}/template.cfg
mode = 640 mode = 640
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