Big Refactoring (BR) of the test execution model
Get rid of narval preprocessors in favor of Recipes
- Each preprocessing recipe must be run from the "main" recipe (thus we add
a ATest.exec_recipe() method that can be called from Recipe execution).
- We add a (Repository, checkout_recipe, Recipe) relation, which is the
Recipe that tells how to retrieve the code for a given Repository
- Also add a (ProjectEnvironment, setup_recipe, Recip) dedicated to perform
the installation for a project (compile and install)
- Add implementations for these recipes for Python project
- Rewrite the quick recipe using this new model
# postcreate script. You could setup a workflow here for example
wf = add_workflow(u'Test configuration workflow', 'TestConfig')
activated = wf.add_state(_('activated'), initial=True)
deactivated = wf.add_state(_('deactivated'))
wf.add_transition(_('deactivate'), activated, deactivated,
requiredgroups=('managers',))
wf.add_transition(_('activate'), deactivated, activated,
requiredgroups=('managers',))
# workflows don't consider schema inheritance, so we need to set it explicitly
rql('SET WF workflow_of TE, TE default_workflow WF WHERE WF workflow_of P, '
'P name "Plan", TE name "TestExecution"')
commit()
print " RECIPES ".center(60, "=")
from cubes.apycot import recipes
recipes.create_recipes(session)
commit()