Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142919 - ensure that USE="test" is enabled with FEATURES="test"
Summary: ensure that USE="test" is enabled with FEATURES="test"
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2006-08-05 14:27 UTC by Josh Nichols (RETIRED)
Modified: 2007-02-12 19:34 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 Josh Nichols (RETIRED) gentoo-dev 2006-08-05 14:27:36 UTC
This has come up very recently on the -dev mailing list, but it is something the Java team has had to deal with for a while now.

For Java packages, the vast majority of packages use junit for unit testing, so at the very least, unit testing always need to pull in junit.

TO address this in Java packages, I've added the following method to java-utils-2.eclass:
java-pkg_ensure-test() {
	if hasq test ${FEATURES} && ! hasq -test ${FEATURES} && ! use test; then
		eerror "You specified FEATURES=test, but USE=test is needed"
		eerror "to pull in the additional dependencies for testing"
		die "Need USE=test enabled"
	fi
}

Certainly, this is not something that is Java specific, so probably could go somewhere like in eutils perhaps? Also, it might be useful to have a usefeature, or something like that, to query enabled features so you don't have to check FEATURES directly.
Comment 1 Tiziano Müller (RETIRED) gentoo-dev 2006-08-05 14:30:55 UTC
Would be nice to have for the new postgresql-ebuild.
Comment 2 SpanKY gentoo-dev 2006-08-05 15:14:13 UTC
this isnt something to file a bug about, hash it out on the gentoo-dev mailing list
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2006-08-05 15:15:25 UTC
Ok, to make it clearer:
There ist a new ebuild for postgresql available (in the postgresql-overlay) which could benefit from both ideas mentioned here.
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-05 15:23:41 UTC
I think it would be better if FEATURES=test enabled USE=test automatically, but also make sure it's not recorded into /var/db/pkg/.../USE or that it's filtered out from --newuse because rebuilding everything just because I've stopped testing makes no sense.
Comment 5 SpanKY gentoo-dev 2006-08-05 15:43:02 UTC
like i said, this is not for bugzilla discussion

take it up on the gentoo-dev mailing list
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-02-06 12:09:29 UTC
Reopen for correct resolution.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-02-06 12:09:52 UTC
This has been fixed in recent portage-2.1.2 revisions.