summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-09-13 11:24:54 -0700
committerZac Medico <zmedico@gentoo.org>2012-09-13 11:24:54 -0700
commit7fac4fd060dff7a5a6180f243176b2ddbb655133 (patch)
treeb46582e6b1de63f171a25141d02b76a689e4135e
parent98a5c7ae69499cc94a1d362aafb9bb2c1eb20ee8 (diff)
downloadportage-7fac4fd060dff7a5a6180f243176b2ddbb655133.tar.gz
portage-7fac4fd060dff7a5a6180f243176b2ddbb655133.tar.bz2
portage-7fac4fd060dff7a5a6180f243176b2ddbb655133.zip
FEATURES=test: test flag respect IUSE_FFECTIVE
-rw-r--r--bin/phase-functions.sh2
-rw-r--r--pym/portage/package/ebuild/config.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index ad9ba6bb0..0883ccd99 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -478,7 +478,7 @@ dyn_test() {
return
fi
- if [ "${EBUILD_FORCE_TEST}" == "1" ] ; then
+ if [[ ${EBUILD_FORCE_TEST} == 1 && test =~ $PORTAGE_IUSE ]]; then
# If USE came from ${T}/environment then it might not have USE=test
# like it's supposed to here.
! has test ${USE} && export USE="${USE} test"
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index ffebd22d1..6ca1cb5b8 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1465,7 +1465,8 @@ class config(object):
not hasattr(self, "_ebuild_force_test_msg_shown"):
self._ebuild_force_test_msg_shown = True
writemsg(_("Forcing test.\n"), noiselevel=-1)
- if "test" in self.features:
+ if "test" in self.features and \
+ ("test" in explicit_iuse or iuse_implicit_match("test")):
if "test" in self.usemask and not ebuild_force_test:
# "test" is in IUSE and USE=test is masked, so execution
# of src_test() probably is not reliable. Therefore,