Re: using build artifacts with autopkgtest
On Tue, 25 Nov 2025 02:08:00 +0100
Santiago Vila <sanvila@debian.org> wrote:
> On Tue, Nov 25, 2025 at 12:55:01AM +0100, Lorenzo wrote:
>
> > Is there a way to access the uncleaned build tree from autopkgtest?
>
> Yes, you can use this in debian/tests/control:
>
> Restrictions: build-needed
>
> and the package will be built before running the autopkgtests.
Thanks, this is what I was looking for.
Best,
Lorenzo
>
> In such case, however, you have to be careful and make sure that you
> are testing the installed programs, not the just-built programs.
>
> In some cases, symlinking the built programs to their counterparts
> in /usr/bin works well enough.
>
> > when I do so, the test fails because it uses two tiny C build
> > artifacts (~40KiB) that are build only to be used in the testsuite
> > and are not part of the deb package.
>
> Beware: the "build-needed" keyword above builds the program with the
> nocheck build profile. What you could do here is to make sure those
> tiny build artifacts are always built, even when using the nocheck
> build profile.
>
> Hope this helps.
>
Reply to: