Pierre Gruet pushed to branch master at Debian Med / sumaclust
Commits: 66aeaa40 by Pierre Gruet at 2020-04-04T11:37:20+02:00 Providing the tests of autopkgtest as examples The tests, a README.test and a wrapper (run-unit-test) are installed into /usr/share/doc/sumaclust/examples. - - - - - 4 changed files: - + debian/README.test - debian/changelog - + debian/sumaclust.examples - + 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 ===================================== @@ -2,6 +2,7 @@ sumaclust (1.0.35-2) UNRELEASED; urgency=medium * Updating fix_build patch after new upstream version * Providing autopkgtests + * Providing those tests in /usr/share/doc/sumaclust/examples -- Pierre Gruet <[email protected]> Sat, 04 Apr 2020 08:44:33 +0200 ===================================== debian/sumaclust.examples ===================================== @@ -0,0 +1,3 @@ +debian/README.test +debian/tests/run-unit-test +debian/tests/cluster* ===================================== debian/tests/run-unit-test ===================================== @@ -0,0 +1,46 @@ +#!/bin/bash +set -e + +pkg=sumaclust + +export LC_ALL=C.UTF-8 +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}" + +sh clusterIdenticalInputs +if [ $? -eq 0 ]; then + echo "Test clusterIdenticalInputs PASSED" +else + echo "Test clusterIdenticalInputs FAILED" +fi + +sh clusterThreeInputs +if [ $? -eq 0 ]; then + echo "Test clusterThreeInputs PASSED" +else + echo "Test clusterThreeInputs FAILED" +fi + +sh clusterTwoInputsTwoSuccessiveCalls +if [ $? -eq 0 ]; then + echo "Test clusterTwoInputsTwoSuccessiveCalls PASSED" +else + echo "Test clusterTwoInputsTwoSuccessiveCalls FAILED" +fi + +sh clusterTwoInputsTwoThresholds +if [ $? -eq 0 ]; then + echo "Test clusterTwoInputsTwoThresholds PASSED" +else + echo "Test clusterTwoInputsTwoThresholds FAILED" +fi + View it on GitLab: https://salsa.debian.org/med-team/sumaclust/-/commit/66aeaa40407b0c6aa2f90c841944988f663c228c -- View it on GitLab: https://salsa.debian.org/med-team/sumaclust/-/commit/66aeaa40407b0c6aa2f90c841944988f663c228c You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
