[python-pyds9] 01/01: Add CI tests

Ole Streicher olebole at moszumanska.debian.org
Thu Apr 16 19:04:04 UTC 2015


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

olebole pushed a commit to branch debian
in repository python-pyds9.

commit 82c6f549d3bb5d15be16230bc2be3258c1dd0738
Author: Ole Streicher <olebole at debian.org>
Date:   Thu Apr 16 21:03:57 2015 +0200

    Add CI tests
---
 debian/changelog        |  1 +
 debian/tests/control    |  2 ++
 debian/tests/pyds9-test | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ca29b1f..9186793 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ python-pyds9 (1.7-2) UNRELEASED; urgency=low
   * Update maintainers e-mail address
   * Update standards version to 3.9.6. No changes needed.
   * Change maintainer and VCS location to debian-astro
+  * Add CI tests.
 
  -- Ole Streicher <olebole at debian.org>  Thu, 25 Sep 2014 12:21:33 +0200
 
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..8b8b15b
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: pyds9-test
+Depends: pyds9, saods9, xauth, xpa-tools, xvfb
diff --git a/debian/tests/pyds9-test b/debian/tests/pyds9-test
new file mode 100755
index 0000000..582ca9c
--- /dev/null
+++ b/debian/tests/pyds9-test
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+#
+# Just start a ds9 instance, load a file, try to access this file, and then
+# quit.
+#
+cp test.fits "${ADTTMP}"
+cd "${ADTTMP}"
+
+xvfb-run --server-args="-screen 0 1024x768x24" python <<EOF
+import ds9
+d = ds9.ds9()
+print ds9.ds9_targets()
+d.set('file test.fits')
+hdul = d.get_pyfits()
+hdul.info()
+hdul.writeto('test1.fits')
+d.set('quit')
+EOF
+
+res=$?
+
+
+ls -l
+
+if [ $res = 0 ] ; then
+    echo "All OK"
+    exit 0
+else
+    echo "Failure"
+    exit $res
+fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-pyds9.git



More information about the debian-science-commits mailing list