From 7fac4fd060dff7a5a6180f243176b2ddbb655133 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 13 Sep 2012 11:24:54 -0700 Subject: [PATCH] FEATURES=test: test flag respect IUSE_FFECTIVE --- bin/phase-functions.sh | 2 +- pym/portage/package/ebuild/config.py | 3 ++- 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, -- 2.26.2