Open arrowd opened 4 months ago
I don't see how this could work without #355. The problem with Poudriere is not that it "simply does not run make test
".
make package
runs. It is a dependency ordering problem which is why your package is missing.
USE_PACKAGE_DEPENDS_ONLY
just prevents building the package at that moment (which only make *-depends
does as far as I can tell/remember).make test
it. https://github.com/freebsd/poudriere/pull/355#issuecomment-152550187For what it's worth I plan to tackle this (#355) after I merge in #822 in the coming weeks.
The test dependencies may not be built by the time make package runs. It is a dependency ordering problem which is why your package is missing.
No, my dependency is built by a previous poud bulk
. Or even poudriere testport
built it, I'll recheck this.
As for #355, I already implemented the hooking at the framework level via Mk/Features/testing.mk
. The user defines WITH_TESTING=yes
or WITH_TESTING_PORTS= some origins
and then make test
is run as part of make package
.
So, in this case really just need USE_PACKAGE_DEPENDS_ONLY=1
to be passed by Poudriere.
Yes, you're right, Poudriere also doesn't queue TEST_DEPENDS. But even just having USE_PACKAGE_DEPENDS_ONLY=1
passed already improves the situation a lot.
Here' is a hack that fixed things for me: https://github.com/arrowd/poudriere/commit/7ac7541d82b905d214894cc509014b5a8e1c6f7d
@arrowd I see several packages failing to build because the test-depends aren't queued by poudriere-devel yet. And those fail because we do not - by default - permit builds to fetch anything (more precisely, to resolve DNS after the fetch stage)
Yes, hacked it up a bit, see my previous comment. But this is either not an ideal solution and a more substantial work has to be done on the Poudriere side.
Before we had the bits in place we have this year, I used to hack my Makefiles with (edited:) BUILD_DEPENDS+=${TEST_DEPENDS}
or something like that, depending on the port. This is somewhat blunt as well... but really lifts TEST_DEPENDS to BUILD_DEPENDS, which is what you need anyways to build a package if you use -DWITH_TESTING
or WITH_TESTING_PORTS=category/portname
, (edited:) because this way, testing is a prerequisite for packaging.
We can't currently separate build-deps from test-deps when building packages, or did I miss some recent development?
This is actually an interesting idea! I will try to find time to play with it, thanks.
We can't currently separate build-deps from test-deps when building packages, or did I miss some recent development?
We can now after very recent changes. I need to put out a PoC for a proper TEST_DEPENDS
/make test
integration.
Edit: commit 48f74bfe888172311b4b25c64f807478df2ece2f
When Poudriere 3.4.1 installs
{BUILD,LIB}_DEPENDS
it passesUSE_PACKAGE_DEPENDS_ONLY=1
to force using packages:Turns out this is not the case for
TEST_DEPENDS
during thepackage
phase:This leads to
The
make test
stage gets hooked into thepackage
phase viaMk/Features/testing.mk
that I've added recently.I guess, this can easily be fixed by making Poudriere pass
USE_PACKAGE_DEPENDS_ONLY=1
for thepackage
phase?