[med-svn] [Git][med-team/glam2][master] 7 commits: Add autopkgtests folder and tests

Andreas Tille gitlab at salsa.debian.org
Sat Mar 16 22:25:54 GMT 2019


Andreas Tille pushed to branch master at Debian Med / glam2


Commits:
36d94d77 by Saira Hussain at 2019-03-16T21:09:18Z
Add autopkgtests folder and tests

- - - - -
32e239ba by Andreas Tille at 2019-03-16T21:53:37Z
Remove temporary dir after test has finished (no matter about success or failure)

- - - - -
fc604401 by Andreas Tille at 2019-03-16T21:55:41Z
Provide main test script as user example in binary package doc dir (and use the name we use in all Debian packages)

- - - - -
9ca7e502 by Andreas Tille at 2019-03-16T21:57:52Z
Add changelog entry including closing bug

- - - - -
28e8863d by Andreas Tille at 2019-03-16T22:00:13Z
Forgot to rename in tests control

- - - - -
152c950f by Andreas Tille at 2019-03-16T22:17:08Z
Add missing "alphabet" option

- - - - -
3ce4720f by Andreas Tille at 2019-03-16T22:25:33Z
We need "Restrictions: allow-stderr" to make test pass.

- - - - -


6 changed files:

- + debian/README.test
- debian/changelog
- debian/docs
- + debian/tests/check-no-args
- + debian/tests/control
- + debian/tests/run-unit-test


Changes:

=====================================
debian/README.test
=====================================
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+    sh run-unit-test
+
+in order to confirm its integrity.


=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+glam2 (1064-6) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add autopkgtest
+    Closes: #909715
+
+ --  Saira Hussain <saira.h0213 at zoho.com>  Sat, 16 Mar 2019 22:56:33 +0100
+
 glam2 (1064-5) unstable; urgency=medium
 
   [ Steffen Moeller ]


=====================================
debian/docs
=====================================
@@ -2,3 +2,5 @@ README
 doc/*.html
 doc/*.css
 doc/*.pdf
+debian/README.test
+debian/tests/run-unit-test


=====================================
debian/tests/check-no-args
=====================================
@@ -0,0 +1,19 @@
+#/bin/sh -e
+
+TMP="$(mktemp)"
+
+# run glam2 with no arguments
+STDOUT="$(glam2 2> ${TMP})"
+
+# check for exit status of 1
+[ "$?" -eq 1 ]
+
+# save help text
+HELP_TEXT="$(glam2 -h)"
+
+# now diff them
+grep -q "{HELP_TEXT}" "${TMP}"
+echo "SUCCESS: Help text is there!"
+
+# clean-up
+rm ${TMP}
\ No newline at end of file


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,5 @@
+Tests: check-no-args
+
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -e
+
+pkg="glam2"
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+   AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* ${AUTOPKGTEST_TMP}
+
+cd ${AUTOPKGTEST_TMP}
+
+glam2 p lipocalin.s
+glam2 -r 1 -n 1000 p crp0.s
+
+echo "PASS"



View it on GitLab: https://salsa.debian.org/med-team/glam2/compare/3df90a47a68de376f9e07d8db30ce2ae700cf703...3ce4720fc340dac2d4aff9c59218bcc1f4fbe9a6

-- 
View it on GitLab: https://salsa.debian.org/med-team/glam2/compare/3df90a47a68de376f9e07d8db30ce2ae700cf703...3ce4720fc340dac2d4aff9c59218bcc1f4fbe9a6
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/20190316/cc5ef13b/attachment-0001.html>


More information about the debian-med-commit mailing list