Bug#1061152: asymptote: autopkgtest should test installed package
Hi Hilmar,
Am 24.01.2024 um 12:42 schrieb Preuße, Hilmar:
> On 19.01.2024 17:23, Sven Joachim wrote:
>
> Hello,
>
>> Your package's autopkgtest runs the upstream test suite which is
>> nice. However, it first builds the program and then tests that,
>> rather than the package from the archive. This is not very useful,
>> as changes in reverse dependencies could cause breakage at runtime
>> which might vanish after a rebuild.
>>
>
> Not sure how to change that. I removed the "build-needed" restriction
> from the test suite control file and run the autopkgtest as follows:
>
> autopkgtest asymptote_2.86+ds1-2_amd64.deb asymptote_2.86+ds1-2.dsc --
> schroot unstable-amd64-sbuild
>
> The test fails:
>
> (Reading database ... 52447 files and directories currently installed.)
> Removing autopkgtest-satdep (0) ...
> autopkgtest [12:35:24]: test test-suite: [-----------------------
> make: *** No rule to make target 'test'. Stop.
> autopkgtest [12:35:25]: test test-suite: -----------------------]
> autopkgtest [12:35:25]: test test-suite: - - - - - - - - - - results
> - - - - - - - - - -
> test-suite FAIL non-zero exit status 2
> autopkgtest [12:35:25]: @@@@@@@@@@@@@@@@@@@@ summary
> test-suite FAIL non-zero exit status 2
>
> ...probably b/c the build did not run yet and there is no Makefile.
Yes, the Makefile is generated from Makefile.in.
> Were you able to run the test suite w/o running a build first? If yes
> let me know how. Thanks!
I have not tried it, but in the tests/ directory there is a nice
Makefile which can be used. It only needs to be persuaded to run the
installed asy program rather than the one from the parent directory.
Something like the attached patch might work, at least if run the
test-suite script under autopkgtest (otherwise you need to create the
$AUTOPKGTEST_TMP temporary directory first).
Sorry for not having tested the patch - actually I do not use asymptote,
only its strange autopkgtest failures like [1] last week motivated me to
look at it.
Good luck,
Sven
1. https://ci.debian.net/packages/a/asymptote/testing/amd64/41886606/
diff --git a/debian/tests/test-suite b/debian/tests/test-suite
index cff9edf2..21797e58 100644
--- a/debian/tests/test-suite
+++ b/debian/tests/test-suite
@@ -2,5 +2,9 @@
set -e
+cp -a tests "$AUTOPKGTEST_TMP"
+ln -s /usr/share/asymptote "$AUTOPKGTEST_TMP"/base
+ln -s /usr/bin/asy "$AUTOPKGTEST_TMP"/asy
+
export ASYMPTOTE_HOME=$(mktemp -d)
-make test
\ No newline at end of file
+make -C "$AUTOPKGTEST_TMP"/tests all
Reply to: