Nilesh Patra pushed to branch master at Debian Med / qrisk2
Commits: 47bb4652 by Nilesh Patra at 2020-07-15T19:19:41+05:30 Add autopkgtest - - - - - 7a283e3e by Nilesh Patra at 2020-07-15T13:50:22+00:00 Fix with cme - - - - - f76ea3b1 by Nilesh Patra at 2020-07-15T19:21:03+05:30 Add "Rules-Requires-Root:no" - - - - - 4 changed files: - − debian/compat - debian/control - + debian/tests/control - + debian/tests/run-unit-test Changes: ===================================== debian/compat deleted ===================================== @@ -1 +0,0 @@ -11 ===================================== debian/control ===================================== @@ -4,12 +4,13 @@ Uploaders: Andreas Tille <[email protected]>, Thorsten Alteholz <[email protected]> Section: science Priority: optional -Build-Depends: debhelper (>= 11~), +Build-Depends: debhelper-compat (= 13), xutils-dev -Standards-Version: 4.2.1 +Standards-Version: 4.5.0 Vcs-Browser: https://salsa.debian.org/med-team/qrisk2 Vcs-Git: https://salsa.debian.org/med-team/qrisk2.git Homepage: http://qrisk.org/ +Rules-Requires-Root: no Package: qrisk2 Architecture: any ===================================== debian/tests/control ===================================== @@ -0,0 +1,4 @@ +Tests: run-unit-test +Depends: @, bc +Restrictions: allow-stderr + ===================================== debian/tests/run-unit-test ===================================== @@ -0,0 +1,35 @@ +#!/bin/bash +set -e + +pkg=sweed + +if [ "${AUTOPKGTEST_TMP}" = "" ] ; then + AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) + trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM +fi + +cd "${AUTOPKGTEST_TMP}" + +function check_compare() +{ + # $1: result of the command + # $2: value to compare result with + if (( $(echo "$1 < $2" |bc -l) )) + then + exit 1 + fi +} + +# Comparing values with a threshold since decimal precision maybe unreliable on different archs +echo 'Test 1' +result=`Q80_model_4_0_commandLine 25 0.5 0 0 0.3 0 0 26 2 0 5 120 0 10 ""` +echo "$result" +check_compare $result 0.1 +echo "PASS" + +echo 'Test 2' +result=`Q80_model_4_0_commandLine 25 0.5 0.2 0.2 0.3 0.5 0.5 26 7 0 6 120 4 10 ""` +echo "$result" +check_compare $result 0.3 +echo "PASS" + View it on GitLab: https://salsa.debian.org/med-team/qrisk2/-/compare/b939548442e548b204c63d2358a6727f70889538...f76ea3b1cdf2a656d8a7fc9ba8af5f82ab2641e0 -- View it on GitLab: https://salsa.debian.org/med-team/qrisk2/-/compare/b939548442e548b204c63d2358a6727f70889538...f76ea3b1cdf2a656d8a7fc9ba8af5f82ab2641e0 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
