[recipe] make recipe names a bit more consistant draft
authorDavid Douard <david.douard@logilab.fr>
Sun, 26 Oct 2014 22:46:44 +0100
changeset 1768 48066736c862
parent 1767 b99269e6e477
child 1769 8e817371cba1
[recipe] make recipe names a bit more consistant
recipes/apycot.python.quick.py
recipes/apycot.python.venv.quick.py
recipes/apycot.quick.py
recipes/apycot.venv.quick.py
test/test_functional.py
testutils.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/recipes/apycot.python.quick.py	Sun Oct 26 22:46:44 2014 +0100
@@ -0,0 +1,31 @@
+# an apycot recipe that run unit tests for python projects
+import os
+from os.path import join
+import sys
+
+from checkers.apycot import python # trigger registration
+from apycotlib import narvalactions as na
+# `plan` (narvalbot.engine.Plan) exists in the globals
+
+with na.apycot_environment(plan) as test:
+    # for each source of the source configuration, we need the URL of
+    # the source repo, the changeset to use, the recipes to use to
+    # make the checkout then the install, and the eid of the
+    # Repository
+    for cset, url, repoeid, checkout, setup in test.src_configuration():
+        # we clone each repo in a dedicated directory (ensure there is
+        # no collision)
+        src = join(test.tmpdir, 'src', str(repoeid))
+        # then execute the checkout (clone + up to cset)
+        test.exec_recipe(checkout, rev=cset,
+                         dst_dir=src,
+                         source_url=url)
+        # now perform the setup process (build and install)
+        test.exec_recipe(setup,
+                         test=test,
+                         prefix=test.tmpdir,
+                         wdir=src)
+    # we can now run the checkers
+    repoeid = test.penvironment['repository']['eid']
+    project_path = join(test.tmpdir, 'src', str(repoeid))
+    checker, status = test.run_checker('pyunit', project_path=project_path)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/recipes/apycot.python.venv.quick.py	Sun Oct 26 22:46:44 2014 +0100
@@ -0,0 +1,35 @@
+# an apycot recipe that run unit tests for python projects
+import os
+from os.path import join
+import sys
+
+from checkers.apycot import python # trigger registration
+from apycotlib import Command, narvalactions as na
+# `plan` (narvalbot.engine.Plan) exists in the globals
+
+with na.apycot_environment(plan) as test:
+    # setup a virtualenv
+    Command(test.writer, ['virtualenv', '--system-site-packages', test.tmpdir], raises=True).run()
+    os.environ['PATH'] = ':'.join([join(test.tmpdir, 'bin'), os.environ['PATH']])
+    os.environ['VIRTUAL_ENV'] = test.tmpdir
+    # for each source of the source configuration, we need the URL of
+    # the source repo, the changeset to use, the recipes to use to
+    # make the checkout then the install, and the eid of the
+    # Repository
+    for cset, url, repoeid, checkout, setup in test.src_configuration():
+        # we clone each repo in a dedicated directory (ensure there is
+        # no collision)
+        src = join(test.tmpdir, 'src', str(repoeid))
+        # then execute the checkout (clone + up to cset)
+        test.exec_recipe(checkout, rev=cset,
+                         dst_dir=src,
+                         source_url=url)
+        # now perform the setup process (build and install)
+        test.exec_recipe(setup,
+                         test=test,
+                         wdir=src)
+    # we can now run the checkers
+    repoeid = test.penvironment['repository']['eid']
+    checker, status = test.run_checker('pyunit',
+                                   project_path=join(test.tmpdir, 'src',
+                                                     str(repoeid)))
--- a/recipes/apycot.quick.py	Sun Oct 26 22:42:02 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-# an apycot recipe that run unit tests for python projects
-import os
-from os.path import join
-import sys
-
-from checkers.apycot import python # trigger registration
-from apycotlib import narvalactions as na
-# `plan` (narvalbot.engine.Plan) exists in the globals
-
-with na.apycot_environment(plan) as test:
-    # for each source of the source configuration, we need the URL of
-    # the source repo, the changeset to use, the recipes to use to
-    # make the checkout then the install, and the eid of the
-    # Repository
-    for cset, url, repoeid, checkout, setup in test.src_configuration():
-        # we clone each repo in a dedicated directory (ensure there is
-        # no collision)
-        src = join(test.tmpdir, 'src', str(repoeid))
-        # then execute the checkout (clone + up to cset)
-        test.exec_recipe(checkout, rev=cset,
-                         dst_dir=src,
-                         source_url=url)
-        # now perform the setup process (build and install)
-        test.exec_recipe(setup,
-                         test=test,
-                         prefix=test.tmpdir,
-                         wdir=src)
-    # we can now run the checkers
-    repoeid = test.penvironment['repository']['eid']
-    project_path = join(test.tmpdir, 'src', str(repoeid))
-    checker, status = test.run_checker('pyunit', project_path=project_path)
--- a/recipes/apycot.venv.quick.py	Sun Oct 26 22:42:02 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-# an apycot recipe that run unit tests for python projects
-import os
-from os.path import join
-import sys
-
-from checkers.apycot import python # trigger registration
-from apycotlib import Command, narvalactions as na
-# `plan` (narvalbot.engine.Plan) exists in the globals
-
-with na.apycot_environment(plan) as test:
-    # setup a virtualenv
-    Command(test.writer, ['virtualenv', '--system-site-packages', test.tmpdir], raises=True).run()
-    os.environ['PATH'] = ':'.join([join(test.tmpdir, 'bin'), os.environ['PATH']])
-    os.environ['VIRTUAL_ENV'] = test.tmpdir
-    # for each source of the source configuration, we need the URL of
-    # the source repo, the changeset to use, the recipes to use to
-    # make the checkout then the install, and the eid of the
-    # Repository
-    for cset, url, repoeid, checkout, setup in test.src_configuration():
-        # we clone each repo in a dedicated directory (ensure there is
-        # no collision)
-        src = join(test.tmpdir, 'src', str(repoeid))
-        # then execute the checkout (clone + up to cset)
-        test.exec_recipe(checkout, rev=cset,
-                         dst_dir=src,
-                         source_url=url)
-        # now perform the setup process (build and install)
-        test.exec_recipe(setup,
-                         test=test,
-                         wdir=src)
-    # we can now run the checkers
-    repoeid = test.penvironment['repository']['eid']
-    checker, status = test.run_checker('pyunit',
-                                   project_path=join(test.tmpdir, 'src',
-                                                     str(repoeid)))
--- a/test/test_functional.py	Sun Oct 26 22:42:02 2014 +0100
+++ b/test/test_functional.py	Sun Oct 26 22:46:44 2014 +0100
@@ -27,7 +27,7 @@
     def test_full_recipe(self):
         with self.admin_access.client_cnx() as cnx:
             lgce = cnx.entity_from_eid(self.lgce)
-            recipe = cnx.execute('Recipe X WHERE X name "apycot.recipe.full"').get_entity(0, 0)
+            recipe = cnx.execute('Recipe X WHERE X name "apycot.python.full"').get_entity(0, 0)
             # reset recipe content
             recipe.cw_set(script=full_script)
             tc = self.add_test_config(cnx, u'full config', env=self.lgce, group=self.pyp,
--- a/testutils.py	Sun Oct 26 22:42:02 2014 +0100
+++ b/testutils.py	Sun Oct 26 22:46:44 2014 +0100
@@ -173,7 +173,7 @@
                                    'python_lint_ignore=thirdparty\n'
                                    'python_test_coverage_treshold=70\n',
                                    check_environment=u'NO_SETUPTOOLS=1\nDISPLAY=:1.0')
-        quickrecipe = cnx.find('Recipe', name='apycot.quick').one()
+        quickrecipe = cnx.find('Recipe', name='apycot.python.quick').one()
         setuprecipe = cnx.find('Recipe', name='apycot.setup.distutils').one()
         tc = cls.add_test_config(cnx, u'tc_quick', group=pyp_tc,
                                  use_recipe=quickrecipe)