[med-svn] r22142 - in trunk/packages/rostlab/proftmb/trunk/debian: . tests
Tatiana Malygina
latticetower-guest at moszumanska.debian.org
Tue Jun 21 05:28:56 UTC 2016
Author: latticetower-guest
Date: 2016-06-21 05:28:54 +0000 (Tue, 21 Jun 2016)
New Revision: 22142
Added:
trunk/packages/rostlab/proftmb/trunk/debian/README.test
trunk/packages/rostlab/proftmb/trunk/debian/docs
trunk/packages/rostlab/proftmb/trunk/debian/tests/
trunk/packages/rostlab/proftmb/trunk/debian/tests/control
trunk/packages/rostlab/proftmb/trunk/debian/tests/installation-test
Log:
add testsuite+description
Added: trunk/packages/rostlab/proftmb/trunk/debian/README.test
===================================================================
--- trunk/packages/rostlab/proftmb/trunk/debian/README.test (rev 0)
+++ trunk/packages/rostlab/proftmb/trunk/debian/README.test 2016-06-21 05:28:54 UTC (rev 22142)
@@ -0,0 +1,25 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by executing
+
+ sh installation-test
+
+in order to confirm its integrity.
+
+This test calls `proftmb` with default options file and example data, when
+checks that resulting files are the same as provided example files (which are
+result of proftmb call with the same parameters).
+
+Couldn't find (option -d) or it wasn't a directory.
+
+To test manually, cd to some directory where you have write permissions and do
+
+ cp -a /usr/share/doc/proftmb/examples/* .
+ proftmb @/usr/share/proftmb/options -q example.Q -o result
+
+Note if you provide options file path parameter, like in example above, you
+*must* prepend '@' symbol to it.
+
+More details on parameters and output formats are available in the package's man
+page (run `man proftmb`).
Added: trunk/packages/rostlab/proftmb/trunk/debian/docs
===================================================================
--- trunk/packages/rostlab/proftmb/trunk/debian/docs (rev 0)
+++ trunk/packages/rostlab/proftmb/trunk/debian/docs 2016-06-21 05:28:54 UTC (rev 22142)
@@ -0,0 +1,2 @@
+debian/README.test
+debian/tests/installation-test
Added: trunk/packages/rostlab/proftmb/trunk/debian/tests/control
===================================================================
--- trunk/packages/rostlab/proftmb/trunk/debian/tests/control (rev 0)
+++ trunk/packages/rostlab/proftmb/trunk/debian/tests/control 2016-06-21 05:28:54 UTC (rev 22142)
@@ -0,0 +1,3 @@
+Tests: installation-test
+Depends: @
+Restrictions: allow-stderr
Added: trunk/packages/rostlab/proftmb/trunk/debian/tests/installation-test
===================================================================
--- trunk/packages/rostlab/proftmb/trunk/debian/tests/installation-test (rev 0)
+++ trunk/packages/rostlab/proftmb/trunk/debian/tests/installation-test 2016-06-21 05:28:54 UTC (rev 22142)
@@ -0,0 +1,45 @@
+#!/bin/sh
+# autopkgtest check: build and run with default test data
+# Author: Tatiana Malygina <merlettaia at gmail.com>
+
+set -e
+
+pkg=proftmb
+
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/examples/* .
+find . -type f -name "*.gz" -exec gunzip \{\} \;
+for lnk in `find . -type l -name "*.gz"` ; do
+ ln -s `basename $(readlink $lnk) .gz` `echo $lnk | sed 's/\.gz$//'`
+ rm $lnk
+done
+
+echo "Run proftmb..."
+# call example from man:
+proftmb @/usr/share/${pkg}/options -q example.Q -o result
+
+echo "Checking output files existance..."
+#according to man, there should be 3 files:
+[ -s result_proftmb_tabular.txt ]
+[ -s result_proftmb_pretty.txt ]
+[ -s result_dat.txt ]
+
+[ -s example_proftmb_tabular.txt ]
+[ -s example_proftmb_pretty.txt ]
+[ -s example_dat.txt ]
+
+#compare them with expected example output:
+echo "Comparing result with expected example output..."
+[ -z $( cmp -s result_proftmb_tabular.txt example_proftmb_tabular.txt ) ]
+echo "...files result_proftmb_tabular.txt and example_proftmb_tabular.txt match"
+
+[ -z $( cmp -s result_proftmb_pretty.txt example_proftmb_pretty.txt ) ]
+echo "...files result_proftmb_pretty.txt and example_proftmb_pretty.txt match"
+
+[ -z $( cmp -s result_dat.txt example_dat.txt ) ]
+echo "...files result_dat.txt and example_dat.txt match"
More information about the debian-med-commit
mailing list