[Debian-med-packaging] Bug#962190: primer3: please disable Big Endian tests on autopkgtests too
Gianfranco Costamagna
locutusofborg at debian.org
Thu Jun 4 15:29:39 BST 2020
control: tags -1 patch
This might work better:
--- primer3-2.4.0/debian/tests/run-unit-test 2018-05-28 15:44:30.000000000 +0200
+++ primer3-2.4.0/debian/tests/run-unit-test 2020-06-04 11:47:04.000000000 +0200
@@ -8,6 +8,12 @@
AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
+BUILDARCH=$(dpkg-architecture -q DEB_BUILD_ARCH_ENDIAN)
+
+P3CORE_FAILED_TESTS="primer_masker primer_masker_formatted"
+
+FAILED_TESTS="testmasker"
+
cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP
@@ -19,6 +25,16 @@
ln -s /usr/bin/ntthal ./src/ntthal
ln -s /usr/bin/oligotm ./src/oligotm
+if [ $BUILDARCH = big ]; then
+ cp -a test/p3test.pl test/p3test.pl~
+ cp -a test/Makefile test/Makefile~
+ # exclude tests known to fail on big endian
+ # See README.source for further explanation.
+ for tst in $P3CORE_FAILED_TESTS ; do sed -i "/$tst/d" test/p3test.pl ; done
+ sed -i "0,/$FAILED_TESTS/s///" test/Makefile
+ sed -i "/$FAILED_TESTS/,/endif/d" test/Makefile
+fi
+
cd test/;
echo "testcmdline:"
@@ -36,4 +52,12 @@
echo "testtm:"
perl oligotm_test.pl ${TESTOPTS}
+cd ..
+
+if [ $BUILDARCH = big ]; then
+ # restore original test file
+ mv test/p3test.pl~ test/p3test.pl
+ mv test/Makefile~ test/Makefile
+fi
+
echo "PASS"
More information about the Debian-med-packaging
mailing list