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

Improve slapos-testing

parent 45e12570
......@@ -99,13 +99,13 @@ class CloudoooRecipe(GenericBaseRecipe):
return path_list
class SlapUnitTestRecipe(GenericBaseRecipe):
class EggTestRecipe(GenericBaseRecipe):
def install(self):
path_list = []
common_dict = dict(
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(self.createPythonScript(self.options['run-test-suite'],
__name__ + '.test.runTestSuite', [dict(
......
......@@ -6,19 +6,41 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
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]
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 = ${buildout:bin-directory}/runTestSuite
run-test-suite-binary = ${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 =
run-test-suite-binary =
test-list = $${slapos.recipe.template:location},$${slapos.core:location}
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
srv = ${buildout:directory}/srv
source-code = $${:srv}/eggs-source-code
bin = ${buildout:directory}/bin
[buildout]
extends =
../../component/slapos/buildout.cfg
../../component/git/buildout.cfg
extends = ../../stack/slapos.cfg
../../component/git/buildout.cfg
develop =
${:parts-directory}/slapos.core-repository
parts = runTestSuite
slapos.core-repository
slapos.recipe.template-repository
template
parts += slapos.core-repository
check-recipe
runTestSuite
develop = ${buildout:parts-directory}/parts/erp5.util-repository
${buildout:parts-directory}/parts/erp5.cookbook-repository
[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]
recipe =
zc.recipe.testrunner
recipe = zc.recipe.egg
eggs =
slapos.core
erp5.util
# slapos.core do not use python convention to find the
# tests.
defaults = ['--tests-pattern', '$', '-v']
entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite
# Local development
[slapos.core-repository]
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
scripts =
runTestSuite
[check-recipe]
[download-source]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.core.egg-link
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
[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]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum =
md5sum = 1382838589e31ebfcba4420d9c7d42d9
output = ${buildout:directory}/template.cfg
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