[r-cran-elliptic] 01/01: added unit tests
Jonathon Love
jon at thon.cc
Sat Aug 29 09:40:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
jonathon-guest pushed a commit to branch master
in repository r-cran-elliptic.
commit 55116a978368a6cdda13bea74f098cd631fb09de
Author: Jonathon Love <jon at thon.cc>
Date: Sat Aug 29 11:40:38 2015 +0200
added unit tests
---
debian/README.test | 9 +++++++++
debian/changelog | 6 ++++++
debian/docs | 3 +++
debian/tests/control | 3 +++
debian/tests/run-unit-test | 20 ++++++++++++++++++++
5 files changed, 41 insertions(+)
diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..ab9ca74
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,9 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+To run the unit tests provided by the package you can do
+
+ sh run-unit-test
+
+in this directory.
+
diff --git a/debian/changelog b/debian/changelog
index 3fbe218..1f58e26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+r-cran-elliptic (1.3-5-2) UNRELEASED; urgency=low
+
+ * Added unit tests
+
+ -- Jonathon Love <jon at thon.cc> Sat, 29 Aug 2015 11:37:41 +0200
+
r-cran-elliptic (1.3-5-1) unstable; urgency=low
* Initial release. (Closes: #797202)
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..3adf0d6
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+debian/README.test
+debian/tests/run-unit-test
+tests
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..4c7329b
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+
+pkg=r-cran-elliptic
+
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+gunzip -r *.gz
+for runtest in `ls *.R` ; do
+ LC_ALL=C R --no-save < $runtest >/dev/null
+ if [ ! $? ] ; then
+ echo "Test ${runtest} failed"
+ exit 1
+ else
+ echo "Test ${runtest} passed"
+ fi
+done
+rm -rf $ADTTMP/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-elliptic.git
More information about the debian-science-commits
mailing list