Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775260 - x11-base/xorg-server: stop unnecessarily building tests
Summary: x11-base/xorg-server: stop unnecessarily building tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-10 14:17 UTC by David Michael
Modified: 2021-03-11 16:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2021-03-10 14:17:36 UTC
The xorg-server package builds its test directory by default, even when it's not used.  This is particularly noticeable since GCC 10 stabilization, where the tests fail to build when LTO is enabled.

There is a configure option to disable building tests, so can something like this be used to improve build time?

has test ${FEATURES} && XORG_CONFIGURE_OPTIONS+=( --disable-unit-tests )
Comment 1 David Michael 2021-03-10 14:18:52 UTC
Sorry, I wrote the wrong operator.

has test ${FEATURES} || XORG_CONFIGURE_OPTIONS+=( --disable-unit-tests )
Comment 2 Mike Gilbert gentoo-dev 2021-03-10 16:30:06 UTC
Testing the FEATURES variable should always be a last resort since it isn't defined in PMS.

We would normally handle this by adding a "test" USE flag. For example:

IUSE="test"
RESTRICT="!test? ( test )"

XORG_CONFIGURE_OPTIONS+=(
    $(use_enable test unit-tests)
)
Comment 3 Larry the Git Cow gentoo-dev 2021-03-11 16:18:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1077d20c45457add875d30752c475d0d0da09a6

commit f1077d20c45457add875d30752c475d0d0da09a6
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2021-03-11 16:12:03 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2021-03-11 16:18:18 +0000

    x11-base/xorg-server: Add IUSE=test
    
    Closes: https://bugs.gentoo.org/775260
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-base/xorg-server/xorg-server-1.20.10-r2.ebuild | 4 +++-
 x11-base/xorg-server/xorg-server-1.20.10-r3.ebuild | 4 +++-
 x11-base/xorg-server/xorg-server-9999.ebuild       | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)