[med-svn] [Git][med-team/clearcut][master] 3 commits: add stdin test for proper input

Joyce Zhou gitlab at salsa.debian.org
Fri Mar 29 05:19:45 GMT 2019



Joyce Zhou pushed to branch master at Debian Med / clearcut


Commits:
69db88ac by Joyce Zhou at 2019-03-29T05:14:34Z
add stdin test for proper input

- - - - -
7cb801e3 by Joyce Zhou at 2019-03-29T05:15:29Z
Add stdin test for malformed input

- - - - -
b34ee2b5 by Joyce Zhou at 2019-03-29T05:18:18Z
Update changelog timestamp

- - - - -


4 changed files:

- debian/changelog
- + debian/tests/check-malformed
- debian/tests/control
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -7,7 +7,7 @@ clearcut (1.0.9-4) UNRELEASED; urgency=medium
   * Add autopkgtest
     Closes: #909711
 
- -- Joyce Zhou <jyzhou15 at uw.edu>  Thu, 28 Mar 2019 09:01:31 +0100
+ -- Joyce Zhou <jyzhou15 at uw.edu>  Thu, 28 Mar 2019 22:16:52 -0700
 
 clearcut (1.0.9-3) unstable; urgency=medium
 


=====================================
debian/tests/check-malformed
=====================================
@@ -0,0 +1,23 @@
+#!/bin/sh
+# do not use set -e because we expect an error code
+
+kg="clearcut"
+
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  # Double quote below to expand the temporary directory variable now versus
+  # later is on purpose.
+  # shellcheck disable=SC2064
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+# run clearcut with no args, passing in empty content.
+# This should return nonzero (malformed input)
+echo "" | clearcut
+
+exit [ "$?" -neq 0 ]
+


=====================================
debian/tests/control
=====================================
@@ -1,3 +1,7 @@
 Tests: run-unit-test
 Depends: @
 Restrictions: allow-stderr
+
+Tests: check-malformed
+Depends: @
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -19,5 +19,7 @@ cd "${AUTOPKGTEST_TMP}"
 clearcut --alignment --DNA --in=alignment1.dist --out=treefile.tre
 # Compute tree from matrix
 clearcut --distance --in=symmetric.dist --out=symmtree.tre
+# Run clearcut with properly formatted stdin input
+cat lower_diag.dist | clearcut
 
 echo "test pass"



View it on GitLab: https://salsa.debian.org/med-team/clearcut/compare/5ddc8b3fac55a560fe231633c2570d5c0dda5e53...b34ee2b51ecd6e51607b7bfb137cd718caecc8f5

-- 
View it on GitLab: https://salsa.debian.org/med-team/clearcut/compare/5ddc8b3fac55a560fe231633c2570d5c0dda5e53...b34ee2b51ecd6e51607b7bfb137cd718caecc8f5
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190329/7cb2c6e3/attachment-0001.html>


More information about the debian-med-commit mailing list