• Jérome Perrin's avatar
    slapos-testing: rework to use buildout to install eggs and dependencies · c91c4722
    Jérome Perrin authored
    Instead of letting `python setup.py test` install the depencies, use
    buildout way of installing the eggs.
    
    This software use `interpreter` recipe of `zc.recipe.egg` to install a
    python with all eggs pre-installed. This is a way to get all the
    dependencies at install time instead of getting them at run time from
    pypi when running `python setup.py test`.
    `erp5.util.testsuite` has been extended to support a parameter to
    specify which python interpreter to use.
    
    One issue is that this way of installing eggs by buildout cause chicken
    and egg problem: cloning repository containing `slapos.recipe.cmmi`
    needs git, and to compiling git needs `slapos.recipe.cmmi`.
    The consequence of this is that re-running software will install too
    many parts again.
    One solution for this would be to clone `slapos.recipe.cmmi` with a
    `git` command provided by testnode or system package.
    Another solution would be to not install `slapos.recipe.cmmi` develop
    egg, simply install the egg from it's current pypi version while
    installing the software (running tests will be from the git checkout
    anyway).
    For now this is open issue.
    
    Another point of attention is that `python setup.py test` install the
    requirements listed in `test_requires`, but `zc.recipe.egg` does not
    provide a way of installing these. Some of our packages have `[test]`
    entrypoints, in this case, the software installs the test entrypoints.
    For others, we install the eggs.
    
    Other improvements:
     * use a simple `slapos.recipe:wrapper` instead of `slapos.cookbook:egg_test`
     * fix the typo in repository name erp5-util-repository ->
       erp5.util-repository ( this mean we will have to fix the test suites in
       nexedi ERP5 )
     * document "what is this software" and a scenario of how this software
       can be used to develop slapos eggs.
     * switch to buildout-hash.cfg for easier template hash management.
    c91c4722
To learn more about this project, read the wiki.
README.md 1.52 KB