Author: latticetower-guest Date: 2016-07-08 14:08:54 +0000 (Fri, 08 Jul 2016) New Revision: 22445
Added: trunk/packages/rostlab/profphd-utils/trunk/debian/tests/ trunk/packages/rostlab/profphd-utils/trunk/debian/tests/control trunk/packages/rostlab/profphd-utils/trunk/debian/tests/convert-seq-test trunk/packages/rostlab/profphd-utils/trunk/debian/tests/filter-hssp-test Modified: trunk/packages/rostlab/profphd-utils/trunk/debian/changelog Log: add testsuite for autopkgtest Modified: trunk/packages/rostlab/profphd-utils/trunk/debian/changelog =================================================================== --- trunk/packages/rostlab/profphd-utils/trunk/debian/changelog 2016-07-08 14:08:07 UTC (rev 22444) +++ trunk/packages/rostlab/profphd-utils/trunk/debian/changelog 2016-07-08 14:08:54 UTC (rev 22445) @@ -3,6 +3,7 @@ * Team upload. * add debian/examples/ to use with testsuite * add profphd-utils.examples + * add testsuite for autopkgtest -- Tatiana Malygina <[email protected]> Fri, 08 Jul 2016 17:03:18 +0300 Added: trunk/packages/rostlab/profphd-utils/trunk/debian/tests/control =================================================================== --- trunk/packages/rostlab/profphd-utils/trunk/debian/tests/control (rev 0) +++ trunk/packages/rostlab/profphd-utils/trunk/debian/tests/control 2016-07-08 14:08:54 UTC (rev 22445) @@ -0,0 +1,2 @@ +Tests: convert-seq-test, filter-hssp-test +Depends: @ Added: trunk/packages/rostlab/profphd-utils/trunk/debian/tests/convert-seq-test =================================================================== --- trunk/packages/rostlab/profphd-utils/trunk/debian/tests/convert-seq-test (rev 0) +++ trunk/packages/rostlab/profphd-utils/trunk/debian/tests/convert-seq-test 2016-07-08 14:08:54 UTC (rev 22445) @@ -0,0 +1,33 @@ +#!/bin/sh +# autopkgtest check: build and run with default test data +# Author: Tatiana Malygina <[email protected]> + +set -e + +pkg=profphd-utils + +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 + +# NOTE: following commands were used because convert_seq works in interactive +# mode. Each `\n` means enter and corresponds to moving forward to next command. +# Thus, following calls emulate interactive mode. +# As stated in man page, program writes output to STDOUT. +# It means that in normal situation no errors should be produced. + +echo "1ppt.hssp\nm\n\n\n\n" | convert_seq +[ -s 1ppt.msf ] + +echo "1ppt.hssp\ny\n\n\n\n" | convert_seq +[ -s 1ppt.phy ] Added: trunk/packages/rostlab/profphd-utils/trunk/debian/tests/filter-hssp-test =================================================================== --- trunk/packages/rostlab/profphd-utils/trunk/debian/tests/filter-hssp-test (rev 0) +++ trunk/packages/rostlab/profphd-utils/trunk/debian/tests/filter-hssp-test 2016-07-08 14:08:54 UTC (rev 22445) @@ -0,0 +1,33 @@ +#!/bin/sh +# autopkgtest check: build and run with default test data +# Author: Tatiana Malygina <[email protected]> + +set -e + +pkg=profphd-utils + +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 + +# NOTE: following commands were used because filter_hssp works in interactive +# mode. Each `\n` means enter and corresponds to moving forward to next +# command. +# Thus, following calls emulate interactive mode. +# As stated in man page, program writes output to STDOUT. +# It means that in normal situation no errors should be produced. + +#metric_path="/usr/share/profphd/prof/mat/Maxhom_GCG.metric" +metric_path="Maxhom_GCG.metric" +echo "1ppt.hssp\n1ppt_filtered.hssp\n${metric_path}\n\n\n\n" | filter_hssp +[ -s 1ppt_filtered.hssp ] _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
