author David Douard <>
Fri, 14 Nov 2014 12:51:47 +0100
changeset 1740 f3137466457a
child 1613 8297da522f82
permissions -rw-r--r--
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

from os import listdir
from os.path import join, dirname

def create_recipes(cnx):
    recipes = []
    rdir = dirname(__file__)
    for recipe in listdir(rdir):
        if recipe.endswith('.py') and not recipe.startswith('_'):
            rname = recipe[:-3]
                script = open(join(rdir, recipe)).read()
                r = cnx.create_entity('Recipe',
            except Exception as exc:
                cnx.warning('Failed to create Recipe %s (%s)'%(rname, exc))
    return recipes