Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Mar 2024 16:19:36 +0100
From:      Daniel Engberg <daniel.engberg.lists@pyret.net>
To:        Gleb Popov <arrowd@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: c2afef5c2587 - main - Features/testing.mk: Introduce the TESTING_UNSAFE knob.
Message-ID:  <0aba1eb996aeee8e357e8017719fdccd@mail.infomaniak.com>
In-Reply-To: <CALH631n%2Bxb2bwqZgQc0NM0E=u3PE_Oc7X5v%2BxbBJYTkDhyqa0A@mail.gmail.com>
References:  <202403011927.421JRqxx065749@gitrepo.freebsd.org> <ab6429b3b2004cd8ad9e7ed0b563a5c9@mail.infomaniak.com> <CALH631n%2Bxb2bwqZgQc0NM0E=u3PE_Oc7X5v%2BxbBJYTkDhyqa0A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2024-03-02T08:45:20.000+01:00, Gleb Popov <arrowd@freebsd.org> wrote:
>  On Fri, Mar 1, 2024 at 11:20=E2=80=AFPM Daniel Engberg
> <daniel.engberg.lists@pyret.net> wrote:
>=20
> >  =20
> >  Hi,
> >=20
> >  Thanks for adding this, however this won't work on ports that uses TES=
T menu option as far as I can tell which is a relatively common occurence?
> >=20
> >  Se also https://cgit.freebsd.org/ports/tree/Mk/bsd.options.desc.mk#n49=
5
> >  Best regards,
> >  Daniel
> >=20
> =20
> There is a subtle overlap between Features and OPTIONS that I still
> have not fully grasped.
>=20
> A Feature can be thought of as an OPTION that is generic enough to be
> applied to every port. For instance, almost every software can be
> built in the "debug" mode (whatever that means), which makes DEBUG a
> good candidate for a Feature and not an OPTION. However, some software
> may have additional toggles that are not hooked into the standard way
> of enabling debug mode for a given build system.
>=20
> A CMake example - there is a standard CMAKE_BUILD_TYPE variable, but
> the software may also define sort of ENABLE_EXTRA_CHECKS option, which
> further improve debugging experience but is not enabled by
> CMAKE_BUILD_TYPE.
>=20
> In such cases it might have a sense to define the DEBUG option and
> then do DEBUG_CMAKE_ON=3D -DENABLE_EXTRA_CHECKS=3Dyes in the port.
>=20
> In case of LTO a software may require some additional dependency, so
> that just setting WITH_LTO=3Dyes would not be enough. So this is another
> case where the option-corresponding-to-a-feature is required.
>=20
> Note that it is still possible to build WITH_DEBUG=3Dyes but
> WITHOUT=3DDEBUG. It will enable debugging in general, but not enable
> some specific debugging features for the given port. This hints that
> Features and OPTIONS are separate ideas and probably should coexist.
>=20
> Getting back to the TESTING feature, I agree that the TEST option
> doesn't really make sense as it is. At least we should change its
> description and remove the "and/or run" part, because running tests is
> now (and should be) a Feature-level decision.
> Maybe the TEST option doesn't make sense at all now, but like I said I
didn't get my head over it yet. Let's see how it goes.

In my experience and looking at other ports the framework lacks functionali=
ty and/or causes execution to fail which is why the menu option is utilized=
. Just looking at cmake:testing we're already working around the stock TEST=
_* options and functionality available.

Best regards,
Daniel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0aba1eb996aeee8e357e8017719fdccd>