[cpl-plugin-giraf] 01/04: Added simple CI test

Ole Streicher olebole at moszumanska.debian.org
Fri Apr 17 12:51:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch debian
in repository cpl-plugin-giraf.

commit 190a3eeddbd4d0736920b01bc6c53fe4d59973e4
Author: Ole Streicher <olebole at debian.org>
Date:   Fri Apr 17 14:35:15 2015 +0200

    Added simple CI test
---
 debian/tests/control        |  2 ++
 debian/tests/test-recipe.py | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..1bdcb97
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Test: test-recipe.py
+Depends: @, python-cpl
diff --git a/debian/tests/test-recipe.py b/debian/tests/test-recipe.py
new file mode 100755
index 0000000..9c901ab
--- /dev/null
+++ b/debian/tests/test-recipe.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+#
+# Simple pipeline test by loading all recipes and printing some
+# basic information from them.
+#
+
+import cpl
+recipes = cpl.Recipe.list()
+if len(recipes) == 0:
+    print("No pipeline recipes found")
+    exit(1)
+
+for rname, versions in recipes:
+    print("Recipe {0}:".format(rname))
+    for v in versions:
+        print("    version {0}".format(v))
+    recipe = cpl.Recipe(rname)
+    print("  Parameters: {0}".format(str(recipe.param)))
+    print("  Docstring: {0}".format(recipe.__doc__.strip()))
+    print("  Author: {0} <{1}>".format(recipe.__author__.strip(),
+                                       recipe.__email__.strip()))
+    print("\n")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/cpl-plugin-giraf.git



More information about the debian-science-commits mailing list