Pierre Gruet pushed to branch master at Debian Med / ngs-sdk
Commits: 0b229e0b by Pierre Gruet at 2022-05-03T20:48:50+02:00 Rewriting the autopkgtest to test the as-installed package Previously the autopkgtest rebuilt the libs in the source tree. - - - - - 045a5e66 by Pierre Gruet at 2022-05-03T20:50:01+02:00 No need to limit architectures for the autopkgtest - - - - - f1a0c870 by Pierre Gruet at 2022-05-03T20:56:49+02:00 Updating changelog - - - - - 841bbf02 by Pierre Gruet at 2022-05-03T21:56:24+02:00 Upload to unstable - - - - - 3 changed files: - debian/changelog - debian/tests/control - debian/tests/run-unit-test Changes: ===================================== debian/changelog ===================================== @@ -1,11 +1,10 @@ -ngs-sdk (2.11.2-4) UNRELEASED; urgency=medium +ngs-sdk (2.11.2-4) unstable; urgency=medium * Team upload + * Rewriting the autopkgtest to test the package as-installed + (Closes: #1006732) - [ Lance Lin ] - * Updated d/tests/control to only run on x86_64 (Closes: #1006732) - - -- Lance Lin <[email protected]> Wed, 27 Feb 2022 19:31:33 +0700 + -- Pierre Gruet <[email protected]> Tue, 03 May 2022 21:17:32 +0200 ngs-sdk (2.11.2-3) unstable; urgency=medium ===================================== debian/tests/control ===================================== @@ -1,4 +1,3 @@ Tests: run-unit-test Depends: @, build-essential Restrictions: allow-stderr -Architecture: x86_64 ===================================== debian/tests/run-unit-test ===================================== @@ -1,18 +1,47 @@ #!/bin/sh # Author: Lance Lin <[email protected]> +# Pierre Gruet <[email protected]> # Date: 18 February 2022 +# 3 May 2022 # File: run-unit-test # Purpose: run a simple-unit test for the ngs-sdk package # # Details: -# Run the built-in test (make test) for the ngs-sdk package +# Run the tests after building them against the libs in the -dev package. set -e -cd ngs-sdk -echo "run-unit-test: running configure" -./configure -echo "run-unit-test: making test" -make test -echo "run-unit-test: done" +pkg=ngs-sdk + +export LC_ALL=C.UTF-8 +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 ngs-sdk/test/ "${AUTOPKGTEST_TMP}" +cd "${AUTOPKGTEST_TMP}/test" + +# Building the test-engine lib +cd test_engine +g++ -c -I/usr/include/ngs/unix/generic -Wall -fpic *.cpp +g++ -shared -o libtest_engine.so *.o + +# Building the test file against the lib and the test-engine lib. +cd ../ngs-test +g++ -I../../ -I/usr/include/ngs/unix/generic -L../test_engine -Wall -o test main.cpp -ltest_engine -lngs-c++ -lngs-adapt-c++ + +# Running the tests and collecting the results in outputTest +LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../test_engine" ./test > outputTest + +# Now outputTest should contain something like +# "Test cases run: 107 +# Test cases passed: 107" +# So we remove everything before the colons, remove duplicates and check there +# remains only one line in the file (i.e. the count of passing tests is the +# same as the count of tests). +sed 's/.*: //' outputTest | uniq | wc -l | grep -q "1" +if [ $? -eq 0 ]; then + echo "All tests PASSED" +fi View it on GitLab: https://salsa.debian.org/med-team/ngs-sdk/-/compare/89ffe3e7e222b9a4f3b2aee5ecdbd1b293aa8e39...841bbf027349fb37ce6c3cd3ccf57b38048af589 -- View it on GitLab: https://salsa.debian.org/med-team/ngs-sdk/-/compare/89ffe3e7e222b9a4f3b2aee5ecdbd1b293aa8e39...841bbf027349fb37ce6c3cd3ccf57b38048af589 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
